John Gay (30 June 1685 – 4 December 1732) was an English poet, dramatist and friend of prominent literary figures Alexander Pope and Jonathan Swift.

Gay is best known for writing The Beggar's Opera in 1728, one of the earliest ballad operas. The opera became popular for featuring contemporary folk tunes, thus satirizing the celebrated Italian operas of the time.

However, The Beggar's Opera also became controversial for its setting in the Newgate Prison and its main characters being criminals who behaved in an upper-class manner. The opera parodied the British nobility, contained veiled criticism of Robert Walpole, the First Lord of the Treasury, and was accused of being a "base form of entertainment" and encouraging crime.