The Church teaches that the Seven Gifts of the Holy Spirit listed in Isaiah 11:2-3 are given to each of us in Baptism.
That's well and good, but it raises some difficulties, among them the fact that Isaiah 11:2-3 doesn't refer to "gifts." Moreover, the Church says generally what the gifts are and what they do for us -- to quote the Catechism again, they "are permanent dispositions which make man docile in following the promptings of the Holy Spirit" -- but doesn't really settle the question of what, if anything, makes the permanent dispositions we call "gifts" any different from the permanent dispositions we call "virtues."
St. Thomas respected the tradition of the Church too much, and he was too systematic a thinker, to brush off the question of how the gifts relate to the virtues. Here I'll paraphrase his answer, as I understand it; later, si Dominus voluerit, I'll write something about what difference it makes.
First, St. Thomas notes that Isaiah 11:2 refers to "a spirit of wisdom and of understanding, a spirit of counsel," and so forth. This, he says, means that it is the Holy Spirit Himself, rather than our own reason, Who causes us to move in wisdom, understanding, and the rest.
St. Thomas has already distinguished three kinds of virtues:
The moral virtues -- chief among them justice, fortitude, and temperance -- which perfect the will in obedience to the reason
The intellectual and moral virtues are natural to us, since they perfect us according to our natural happiness. The theological virtues are supernatural, since they perfect us according to our supernatural happiness.
The Seven Gifts, St. Thomas says, are also supernatural (and so distinguishable from the intellectual and moral virtues). We can't acquire these gifts naturally; as with the theological virtues, they must be infused in us by God.
The difference between the theological virtues and the Gifts, both of which direct us to God, is that, with the theological virtues we still move ourselves by our own (albeit supernaturally enlightened) reason, while with the Gifts the Holy Spirit moves us.
We could sum up with a table like this:
Source & Object
reason and will
Which is as may be (and not every detail of St. Thomas's analysis has been adopted by the Church), but how does knowing this help anyone to love God and neighbor any better?