Scottish physician and classicist. Gregory was the son of the esteemed physician Dr John Gregory (1724-1773) and his wife Elizabeth Forbes (d. 1761). He was married two times, firstly to Mary Ross (d. 1784) and secondly (in 1796) to Isabella Macleod (1772-1847), with whom he had eleven children.
He was educated at Aberdeen Grammar School, before going on to study at the universities of Aberdeen, Edinburgh, Oxford and Leyden. In 1776 he was appointed to the chair formerly held by his father at Edinburgh University, and he also began teaching clinical medicine at the Edinburgh Royal Infirmary. In 1790 he succeeded Dr William Cullen as Head of the Edinburgh University School of Medicine. His reputation was so great, that in 1799 he was appointed First Physician to the King in Scotland to King George III. This commission was renewed by King George IV in 1820.
Gregory was president of the Royal College of Physicians of Edinburgh from 1798 to 1801, but his publishing certain private proceedings of the college led to the suspension of his fellowship on May 13, 1809.
In 1820, Gregory had a riding accident, sustaining fractured ribs and hydrothorax. He never fully recovered, dying the next year. He lies buried, together with his wife and most of his children, next to the philosopher Adam Smith in Edinburgh's Canongate Kirkyard. For several decades after his death, he was known as the creator of "Gregory's Powder", an antacid, stomachic and cathartic which was composed of powdered rhubarb, ginger and magnesium oxide. The mixture was frequently used for stomach complaints until World War I.