In “Elegy Written in a Country Churchyard,” Gray compares the dead of the little village to famous leaders and poets in order to emphasize the importance of the people and the idea of human mortality. It conveys the feeling that in death there is no difference between common and extraordinary people.
I hope it helps, Regards.