In 1796 he was appointed Bampton lecturer, and his discourses were published the same year, under the title of Sermons on the Principles upon which the Reformation of the Church of England was established.
After witnessing many mining accidents, it was Gray that wrote to Humphry Davy asking for his help with the problem of providing light safely in the local underground collieries.
[2] As a result, Davy visited the Northeast of England in August 1815 and discussed the problem with Colliery owners and mining expert John Buddle.
During the Bristol riots of 1831, when one of the minor canons suggested a postponement of divine service, since the rioters were masters of the city, Gray replied that it was his duty to be at his post.
His wife was Elizabeth, sister of Alderman Camplin of Bristol, with whom he had numerous children; including Robert Gray who became Bishop of Cape Town and Metropolitan of Africa.