Born on 2 May 1865 at Bridge of Weir, Renfrewshire, Scotland, Gay was the eldest child of William and Jane Gay (nee Tagg). The younger William studied Greek and English literature at the University of Glasgow before a bout of tuberculosis whilst still a teenager forced him to travel for his health. In April 1885 he arrived at Port Chalmers, New Zealand, and worked on intercolonial steamers as assistant purser. A few years later, in May 1888, Gay arrived in Melbourne and was soon contributing religious articles to Our Good Words, edited by Charles Strong. Early in 1889 he became resident master at Scotch College, but by April he had retired on account of recurring poor health. He spent the next four years travelling and accepting teaching and tutoring posts in Bendigo and Deniliquin. From May 1893 he was confined to bed, but devoted his time to writing poetry (which was published in a number of volumes in the 1890s) and contributing critical pieces to the Australian Herald (including a well-received article on the American poet Walt Whitman, later published in book form). A correspondent of Alfred Deakin, Gay was an enthusiastic advocate for Australian Federation, contributing a sonnet to the cause. He died in Bendigo on 22 December, 1897.