St. Augustine of Hippo shows how the seven Gifts of the Holy Spirit correspond to the first seven Beatitudes (Mt 5:3-9), and how these seven are contained in the Eighth Beatitude (Mt 5:10).
He says: “Here the first place is given to fear [of the Lord], which is suitable for the humble, of whom it is said, ‘Blessed are the poor in spirit,’ that is, those who think not high things, but who fear. The second is piety, which belongs to the meek; for he who seeks piously, reverences, does not find fault, does not resist; and this is to become meek. The third is knowledge, which belongs to those that mourn, who have learned to what evils they are enslaved which they once pursued as goods. The fourth, which is fortitude, rightly belongs to those who hunger and thirst, who seeking joy in true goods, labour to turn away from earthly lusts. The fifth, counsel, is appropriate for the merciful, for there is one remedy to deliver from so great evils, viz. to give and to distribute to others. The sixth is understanding, and belongs to the pure in heart, who with purged eye can see what eye seeth not. The seventh is wisdom, and may be assigned to the peacemakers, in whom is no rebellious motion, but they obey the Spirit.”
Concerning the Eighth Beatitude (“Blessed are they which are persecuted for righteousness’ sake: for theirs is the kingdom of heaven”) he says: “Thus the one reward, the kingdom of heaven, is put forth under various names. To the first, as was right, is placed the kingdom of heaven, which is the beginning of perfect wisdom; as if it should be said, ‘The fear of the Lord is the beginning of wisdom.’ To the meek, an inheritance, as to those who with piety seek the execution of a father’s will. To those that mourn, comfort, as to persons who know what they had lost, and in what they were immersed. To the hungry, plenty, as a refreshment to those who labour for salvation. To the merciful, mercy, that to those who have followed the best counsel, that may be showed which they have showed to others. To the pure in heart the faculty of seeing God, as to men bearing a pure eye to understand the things of eternity. To the peacemakers, the likeness of God.”
Quotations from St. Thomas Aquinas, Catena Aurea: Commentary on the Four Gospels Collected Out of the Works of the Fathers, Vol. I, Part I (Oxford: John Henry Parker, 1841).