In 1831 he entered Exeter College, Oxford, graduating in 1836. He was ordained a deacon in 1837 and was appointed as curate of Bellerby in the North Riding of Yorkshire. He was ordained priest in 1838, and was appointed vicar of Ecclesfield on 23 September 1839, a position he held until his death.
In 1861 he was appointed as rural dean and in 1862 as subdean of York Minster.
Margaret died in 1873, and in 1884 Alfred Gatty married Mary Newman.