Gray was born in York. He went to St Peter's School in York, and Trinity College, Cambridge. From 1883 to 1893, he was Director of Music at Wellington College, Berkshire. In 1893, when Stanford left the post of organist at Trinity College, Alan went back there to become organist, and stayed there until 1930.
Gray wrote several cantatas as well as chamber music and organ music, but he is mainly remembered for his church music, including an Evening Service in F minor (Magnificat and Nunc dimittis). He also composed several descants to various hymn tunes, several of them are still sung today. He did a lot of work as editor of the Purcell Society.
Alan Gray was a very tall man: 2 metres (nearly 6 ft 7in) .
- The New Grove Dictionary of Music & Musicians, ed. Stanley Sadie; 1980; ISBN 1 56159174 2, vol 7