Q:

Who wrote down the equations governing gravity in a field language for the first time?

In his paper The search for unity: Notes for a history of quantum field theory [Daedalus 4, 106 (1977)], Steven Weinberg writes:

The first successful classical field theory was based on Newton's theory of gravitation. Newton himself did not speak of fields - for him, gravitation was a force which acts between every pair of material particles in the universe, "according to the quantity of solid matter which they contain and propagates on all sides to immense distances, decreasing always as the inverse square of the distances." It was the mathematical physicists of the eighteenth century who found it convenient to replace this mutual action at a distance with a gravitational field, a numerical quantity (strictly speaking, a vector) which is defined at every point in space, which determines the gravitational force acting on any particle at that point, and which receives contributions from all the material particles at every other point.

Which mathematical physicists is he referring to?

A:

Lagrange (1736-1813) in 1777, followed by Laplace (1749-1827) in 1782, was the first to introduce the scalar gravitational potential.1
Lagrange's paper, Remarques générales sur lemouvement de plusieurs corps qui s'attirent mutuellement enraison inverse des carrés des distances, was read at the Academy of Berlin on 20 October 1777.2
So Weinberg is correct in saying "eighteenth century" (and not 19th century).
References1. Assis, André K. T. Relational Mechanics and Implementation of Mach’s Principle with Weber’s Gravitational Force. Montréal: Apeiron, 2014, p. 475.2. Duhem, Pierre Maurice Marie. Leçons sur l’électricité et le magnétisme. vol. 1. Paris: Gauthier-Villars, 1891, p. 13.

