Sir William Gregory (1 March 1625 – 28 May 1696) was a British judge and politician. Born the son of the vicar of Fownhope, he was educated at Hereford Cathedral School and All Souls College, Oxford and was then called to the Bar. In 1653 he married Katharine, only daughter and heiress of James Smith of Tillington, by whom he had an only son, James, who died in 1691 before his father. It was not until 1677 that William gained prominence, being elected a Serjeant-at-law. In March 1677 the election of Sir Thomas Williams as a Member of Parliament for Weobly was called into question and declared void, so William Gregory offered himself as a candidate and was elected without opposition on 9 March.
After only a year in Parliament he was elected to serve as Speaker of the House of Commons in the Habeas Corpus Parliament, as a compromise between Parliament, who wished to reelect Sir Edward Seymour and the King, who was averse to him. During his time in Parliament Gregory was instrumental in the passing of the Habeas Corpus Act 1679, and was subsequently knighted and then confirmed as Baron of the Exchequer. In 1689 he was appointed Chief Justice of the King's Bench, a position he held until his death.
In 1677 Gregory purchased the manor and estate of How Caple, Herefordshire, from Edward Caple, whose family had held it since 1289, and subsequently added to it with the purchase of lands in Woolhope and Fownhope, including the manors of Fownhope and Sellershope, spending most of his free time at the manor house at How Caple. He was afflicted with kidney stones, an illness he bore well: a 1694 letter to Sir Edward Harley says: