John Gay (30 June 1685 - 4 December 1732) was an English poet and dramatist. He is best remembered for The Beggar's Opera (1728), set to music by Johann Christoph Pepusch. The characters, including Captain Macheath and Polly Peachum, became household names.
Gay was born in Barnstaple, England and was educated at the town's grammar school and secondly at Blundell's School. On leaving school he was apprenticed to a silk mercer in London, but being weary, according to Samuel Johnson, "of either the restraint or the servility of his occupation", he soon returned to Barnstaple, where he spent some time with his uncle, the Rev. John Hanmer, the Nonconformist minister of the town. He then returned to London.
The dedication of his Rural Sports (1713) to Alexander Pope was the beginning of a lasting friendship. In 1714, Gay wrote The Shepherd's Week, a series of six pastorals drawn from English rustic life. Pope had urged him to undertake this task in order to ridicule the Arcadian pastorals of Ambrose Philips, who had been praised by The Guardian, to the neglect of Pope's claims as the first pastoral writer of the age and the true English Theocritus. Gay's pastorals completely achieved this goal, but his ludicrous pictures of the English country lads and their loves were found to be entertaining on their own account.