While master of the high school of Dumfries, he became a friend of Robert Burns, later teaching his children.
[1] Gray was originally master of the high school of Dumfries, and there became good friends with Robert Burns.
He was eventually stationed at Bhuj in Kutch, and was entrusted by the British government with the education of the young Rao of that province Deshalji II, being, it is said, the first Christian who was ever honoured with such an appointment.
[2] Gray married Mary Phillips of Longbridgemoor, Annandale, eldest sister of the wife of James Hogg.
Hogg introduced Gray into the Queen's Wake, as the fifteenth bard who sang the ballad of King Edward's Dream.