Thomas Gray was born in Cornhill, London. His father, Philip Gray, was a scrivener and his mother, Dorothy Antrobus, was a milliner He was the fifth of 12 children, and the only child of Philip and Dorothy Gray to survive infancy. He lived with his mother after she left his abusive and mentally unwell father. Gray's mother once saved his life by opening one of his veins with her hands.
Gray's mother paid for him to go to Eton College where two of his uncles worked: Robert and William Antrobus. Robert became Gray's first teacher and helped inspire in Gray a love for botany and observational science. Gray's other uncle, William, became his tutor. He recalled his schooldays as a time of great happiness, as is evident in his Ode on a Distant Prospect of Eton College. Gray was a delicate and scholarly boy who spent his time reading and avoiding athletics. He lived in his uncle’s household rather than at college. He made three close friends at Eton: Horace Walpole, son of the Prime Minister Robert Walpole; Thomas Ashton, and Richard West, son of another Richard West who was briefly Lord Chancellor of Ireland. The four prided themselves on their sense of style, sense of humour, and appreciation of beauty. They were called the "quadruple alliance."
In 1734 Gray went up to Peterhouse, Cambridge. He found the curriculum dull. He wrote letters to friends listing all the things he disliked: the masters ("mad with Pride") and the Fellows ("sleepy, drunken, dull, illiterate Things"). Intended by his family for the law, he spent most of his time as an undergraduate reading classical and modern literature, and playing Vivaldi and Scarlatti on the harpsichord for relaxation.
In 1738 he accompanied his old school-friend Walpole on his Grand Tour of Europe, possibly at Walpole's expense. The two fell out and parted in Tuscany, because Walpole wanted to attend fashionable parties and Gray wanted to visit all the antiquities. They were reconciled a few years later. It was Walpole who later helped publish Gray's poetry. When Gray sent his most famous poem, "Elegy," to Walpole, Walpole sent off the poem as a manuscript and it appeared in different magazines. Gray then published the poem himself and received the credit he was due