Iambic pentameter is a metrical pattern that consists of five iambs per line.
An iamb is a two-syllable unit where the first syllable is unstressed, and the second is stressed (da-DUM).
This gives each line a rhythm of ten syllables, alternating between unstressed and stressed syllables.
This meter is commonly used in English poetry, especially in more formal or serious works, and it helps give the poem a dignified, reflective, and rhythmic flow, fitting well with the contemplative nature of Gray's "Elegy."