The horse's heads symbolize the fate of the speaker, who is being driven inextricabably to eternity. The reference evokes the biblical symbol of the "Four Horsemen of the Apocolypse," in which the horses represent the last physical state of being: one's final consciousness of life before the abyss of death (the absence of consciousness).
Here is the whole stanza, which concludes the poem:
Since then -- tis centuries -- and yet / Feels shorter than the day / I first surmised the Horses Heads / Were heading toward Eternity --
As you can see, from her new state of being, the speaker references her last moment of consciousness in this life, when she realizes that her days on Earth are about to end and her new existence is in "Eternity" has begun. The speaker is contemplating just how long it has been when she first observed the grave, "A swelling of the ground." The Horses were the vehicle in which she was transported from the old life to the new.