He was educated locally then studied at the University of Edinburgh, training as a minister.
[1] He was ordained as minister of Cockpen in April 1758 and translated to Lady Yester's Kirk in Edinburgh in October 1767 in place of Rev John Drysdale.
In February 1770 the University of Edinburgh awarded him an honorary Doctor of Divinity.
In this role he was responsible for distributing monies (alms) in the name of the King to people or charities.
[3] Sir Henry Moncrieff-Wellwood preached at Gloag's funeral service on 2 May 1802.