He was born in Belfast, the son of a Dublin-born Church of Ireland clergyman who served in Waterford and Tipperary. He was educated at Bishop Foy's School in Waterford, where a special teacher had to be recruited to coach him in Greek. He subsequently won a sizarship to Trinity College. He was elected a Foundation Scholar in his first year at Trinity, having become an undergraduate in October 1928. He also served as Auditor of the College Classical Society. He was editor of TCD: A College Miscellany in Hilary term of 1931. He became a Fellow in 1934 and was one of the last Fellows to be elected by examination. Stanford was one of seven candidates nominated for the Provostship of the University on 11 March 1952 but was eliminated along with two other candidates in the first round of the election. He was considered, at the age of 41, to be too junior. The successful candidate on that occasion was the mathematician, A.J. McConnell, who remained in office for 20 years.
Stanford established himself as a Greek scholar in his twenties with the publication of two books which approached Greek literature as a subject for literary criticism, Greek Metaphor and Ambiguity in Greek Literature. He is perhaps best remembered for his commentaries aimed at students on Homer's Odyssey, Aristophanes' Frogs, and Sophocles' Ajax.
In 1965, Stanford gave the Sather Lectures at the University of California, Berkeley, on the topic of the pronunciation of Ancient Greek. The lectures were revised into a book published in 1967.
Stanford had a particular interest in the classical tradition, in Ireland and elsewhere, and published a number of articles on this topic in the Trinity journal Hermathena, as well as a brief but wide-ranging book entitled Ireland and the Classical Tradition.
He also represented Trinity in the Seanad between 1951 and 1969. During the 1950s, however, he had the courage to come out publicly against the Fethard Boycott, and he also demanded an inquiry into the assault on Jehovah's Witnesses in Clare. In both cases, Éamon de Valera proved sympathetic personally but declined to take any public action. As a leader of Ireland's small Protestant population, Stanford was a lifelong champion of the proportional representation electoral process, believing that it protected the rights of minorities.