In 1706 he was enabled through Lloyd's liberality to publish in quarto an edition of the fictitious Joseph ben Gorion's 'History of the Jews,’ in the original Hebrew, with a Latin translation and notes. In 1707 he published at the Hague 'L'Église Romaine convaincue de dépravation, d'idolatrie, et d'antichristianisme.' In 1710, at the insistence of Sharp, archbishop of York, he assisted John Ernest Grabe in studying the Arabic manuscripts in the Bodleian Library relating to the Clementine constitutions, on which Sharp had engaged Grabe to write a treatise against William Whiston.
In 1718 his 'Vindiciæ Kircherianæ, sive Animadversiones in novas Abrahami Trommii Concordantias Græcas versionis vulgo dictæ LXX. Interpretum,’ appeared, which was considered an unfair attack on Abraham Trommius, then an aged man. In 1723 he issued in folio Abū Al-Fidā's 'Life of Mahomet,’ in Arabic, with a Latin translation and notes, dedicated to an early patron, Lord Macclesfield.
He prepared an edition of Abū Al-Fidā's 'Geography,’ and in 1726 or 1727 printed as a specimen seventy-two folio leaves, but was unable to proceed, lacking support. The fragment was noticed in the Journal des Savants for 1727. For the benefit of those who were unable to read his Latin translation of Abū Al-Fidā's 'Mahomet,’ he compiled a 'Life' in French, which was published in two volumes by Jean Le Clerc at Amsterdam in 1732. A later edition in three volumes appeared at Amsterdam in 1748; and a German translation in two volumes at was published at Köthen in 1802–4. He had previously made an anonymous continuation to Count H. de Boulainvilliers's 'La Vie de Mahomed,’ London, 1730.
Gagnier's other publications were:
- 'Lettre sur les Médailles Samaritaines,’ printed in 'Nouvelles de la République des Lettres,’ in the Journal de Trévoux, 1705, and a Latin version in vol. xxviii. of Ugolinus's 'Thesaurus Antiquitatum' (p. 1283).
- 'Tabula nova et accurata exhibens paradigmata omnium conjugationum Hebraicarum,’ four large leaves, Oxford, 1710, printed for his pupils.
- 'Carolina. Ecloga in diem natalem Willielminæ Carolinæ, serenissimæ Principis Walliæ,’ London, 1719.
- 'Liber Petra Scandali de principio et causa schismatis duarum ecclesiarum Orientalis et Occidentalis, ex Græco Arabice redditus,’, Oxford, 1721.
- 'Animadversiones in novam Josephi Gorionidis editionem à Jo. Frid. Breithaupto publicatam,’ printed in vol. v. of Le Clerc's 'Bibliothèque Choisie.' He also contributed to vol. ii. of J. A. Fabricius's edition of 'St. Hippolytus' (1716), 'Fragmenta ex catena in Pentateuchum,’ &c., with a Latin translation.
At the invitation of Richard Mead he translated from Arabic the treatise of Rhazes on small-pox. 'Instructions sur les Nicodémites,’ attributed to Gagnier, was shown by Barbier to have been written by Jean Graverol.