Gregory, Sir William Henry (1817–92), MP and colonial governor, was born 12 July 1817 in the under-secretary's lodge, Phoenix Park, Dublin, only son of Robert Gregory (179?–1847) of Coole Park, Co. Galway, and Elizabeth Gregory (1799–1875; née O'Hara) of Raheen, Co. Galway. His grandfather William Gregory (qv) was under-secretary at Dublin Castle (1812–31). Raised in Dublin, William Henry entered Harrow School (1831), where he distinguished himself in classics. In 1837 he commenced reading classics and philosophy at Christ Church, Oxford, chagrined to find that he could not reproduce the effortless superiority over his peers which he had earlier enjoyed. The pain of defeat in two scholarship examinations (coming second in both) was assuaged by the discovery of horseracing at Newmarket and Epsom. A convulsive attack stopped last-minute preparations for his degree in spring 1840, and his wounded pride (together with neglect of studies) put him off again attempting either a first or a common degree. Convalescing in Italy over Christmas 1840/41, he nearly died of gastric fever. In April 1842 he was proposed as tory candidate for the city of Dublin. Family connections with Sir Robert Peel (qv) (1788–1850) and the unwarranted assumption that his sympathies were markedly Orange ensured success over George Howard, Lord Morpeth (qv), at the expense of £9,000. Over the next five years he tried in exasperation to negotiate a middle course in the house of commons between the anti-catholic pledges he had unwisely given before the Dublin election and a natural distaste for aggravating divisions between the denominations. He refused (July 1842) to present a petition of Dublin loyalists urging prohibition of catholic bell-ringing. On the other hand he found fault with the mass admissions of O'Connellite freemen to the city of Dublin in early 1842. Such bellicosity was, however, so obviously shallow that he was shortly obliged to refuse O'Connell's invitation to holiday in Derrynane. Sincere unionism and mild concern for the security of the Church of Ireland did not satisfy his doctrinaire supporters.
Having backed Peel in the debates on the Maynooth grant in April 1845 and later in the adjournment debate on the corn law bill, he was invited by the prime minister in June 1846 to accept the Irish lordship of the treasury. A conscientious fear that taking office might cast doubt on the integrity of his previous votes in the commons (an exaggerated scrupulosity, arising from his divided political allegiances since 1842) led him to decline, a decision he always regretted. In reaction he found that gambling was soon tightening its grip on him. Detailed contributions to the Labouring Poor (Ireland) Bill (February and March 1847) included his infamous proposal that persons in possession of more than one quarter of an acre of land should not be entitled to poor law relief (indoor or outdoor). Though mitigated partly by the earnestness of his endeavours to aid the destitute on his Galway estate, this showed disregard for the potential human costs of applying the clause, which were soon evident, especially in Galway and Mayo. He later persisted in the judgement that this provision had saved the country from falling into pauperism.
Spending election day at the Goodwood races, he lost his Dublin seat narrowly in August 1847. Extravagant gambling over the next few years took his Galway estate to the brink of bankruptcy. Close to two-thirds of the property was sold in 1853 and much of the remainder was leased in 1857 on unfavourable terms. Adopting a more sober lifestyle, and giving up horseracing, he renewed political life when in April 1857 he was elected MP for Co. Galway. First on the liberal wing of the conservative party, he was reelected twice in the 1860s, and formally joined the liberal party in 1865, refusing office under the ministry of the 1st Earl Russell in 1866. During this decade he was deeply involved in the development of the British Museum and the National Gallery. In 1871 he was made a member of the Irish privy council and appointed governor of Ceylon, occupying this post until May 1877; his administration was cultured and humane. Except for several visits abroad (some back to Ceylon) he resided from 1877 in Coole Park. Though tolerant of the land acts of 1881–91, and taking part with goodwill in the judicial readjustment of rent under this legislation, he publicly opposed the aims of the home rule party. He died 6 March 1892 at St George's Place, London.
He married (January 1872) Elizabeth (d. 1873), daughter of Sir William Clay and widow of James Temple Bowdoin. He married secondly (March 1880) Augusta (qv) (Lady Gregory, 1852–1932), youngest daughter of Dudley Persse of Roxborough, Co. Galway. They had one son, Robert Gregory (qv) (1881–1918).