What are the relationships of the Gifts of the Holy Ghost to the beatitudes and virtues? According to Catholic theology, what are the relationships of the seven Gifts of the Holy Ghost to the beatitudes and virtues?
From Garrigou-Lagrange, O.P.'s The Three Ages of the Spiritual Life, part I, article IV, "The Seven Gifts of the Holy Ghost" (fn. 39), the relationship between the gifts of the Holy Ghost and the beatitudes, based on St. Thomas Aquinas's doctrine:  


Gift of Wisdom → Peacemakers (IIa IIae, q.45, a.6): "it gives peace and allows the soul possessing it to give it to others, at times even to the most troubled"
Gift of Understanding → Clean of Heart (q.8, a.7): "those who possess this cleanness of heart begin here on earth, in a certain way, to see God in all that happens to us"
Gift of Knowledge → Mourners (q.9, a.4): "shows us the gravity of sin" (which is the turning to creatures instead of God)
Gift of Counsel → The Merciful (q.52, a.4): "inclines the soul to mercy"
Gift of Piety → The Meek (q.121, a.2): "makes us see in men not rivals, but children of God and our brothers"
Gift of Fortitude → Those Hungering &amp; Thirsting for Justice (q.139, a.2): they "never become discouraged"
Gift of Fear → The Poor in Spirit (q.19, a.12): "they possess the holy fear of the Lord, which is the beginning of wisdom"


The relationship of the gifts to the virtues:


See also Benedict Ashley, O.P.'s "The Gifts of the Holy Spirit."