Stephen Gaselee was born in Brunswick Gardens, Kensington, London, the elder son of Henry Gaselee (1842–1926), fellow of King's College, Cambridge, and his wife, Alice Esther. His great-grandfather was Sir Stephen Gaselee, justice of the court of common pleas.
He was educated at Eton College and King's College, Cambridge (matriculated 1901). He obtained a first class in part 1 of the classical tripos (1904) and a second class in part 2 (1905). He left Cambridge in that year and, as tutor to Prince Leopold of Battenberg (later Lord Leopold Mountbatten) and travelled widely. He returned to Cambridge in 1907 and was editor of the Cambridge Review.
Between 1908 and 1919 he was Pepys librarian at Magdalene College, and became a Fellow in 1909 (which he held for 4 years).
In 1916 Gaselee entered the Foreign Office and was rewarded for this war service in 1918 by appointment as CBE. By Michaelmas term 1919 he was back in Cambridge.
On 1 January 1920 he was made librarian and keeper of the papers at the Foreign Office. He was appointed KCMG in 1935, and served the crown until his death.
In 1917 he married May Evely. They had three daughters.
He had a large number of interests he was a Latinist, Coptologist, medievalist, palaeographer, liturgiologist, and hagiographer. In 1932 he was president of the Bibliographical Society and from 1928 honorary librarian of the Athenaeum.
In 1934 he presented to the Cambridge University Library 300 early printed books, to which he subsequently added his rare and large collection of early sixteenth-century books and his Petroniana.
He died at his home in London on 16 June 1943.
Arms in Hall glass, W1.