The figure of speech in the line "The ploughman homeward plods his weary way" from Gray's Elegy is a transferred epithet.
Transferred Epithet: This figure of speech occurs when an adjective (or epithet) that describes a person or thing is transferred to another word in the sentence that is closely associated with it.
In this case, "weary" is an adjective that describes the ploughman's way, not the ploughman himself, hence the transfer.