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.