To the third one proceeds thus. It seems that gifts of the Holy Spirit are not habitudes. For habitude is a quality remaining in the human being, for it is a difficult-to-change quality [qualitas difficile mobile], as is said in the Categories. But it belongs to Christ that the gifts of the Holy Spirit rest in Him, as is said in Isaiah XI. As is said in John I, On Him whom you see the Spirit descending and remaining on Him, He is who baptizes, of which Gregory, expositing, says, The Holy Spirit comes on all the faithful, but, uniquely, He dwells always in the Mediator.
Further, gifts of the Holy Spirit complete a man inasmuch as he is activated by the Spirit of God, as was said. But inasmuch as a human being is activated by the Spirit of God, he has himself [se habet] somewhat like an instrument with respect to Him. But it is appropriate to an instrument to be completed by not by habitude, but by the principal agent. Therefore the gifts of the Holy Spirit are not habitudes.
Further, the gifts of the Holy Spirit are from divine inspiration, as is the gift of prophecy. But prophecy is not habitude, for the spirit of prophecy is not always present to the prophet, as Gregory says, in Homily I on Ezekiel. Neither, therefore, are the gifts of the Holy Spirit.
But contrariwise is that the Lord said to the disciples, speaking of the Holy Spirit, John XIV, He shall remain with you and be in you. But the Holy Spirit is not in the human being without His gifts.
I reply that it must be said that, as was said, gifts are sorts of completions of the human being by which he is disposed to follow well the instigation of the Holy Spirit. But it is clear from what was said above that moral virtues complete striving impulse inasmuch as it participates in some way reason, to wit, inasmuch as it is born to to be changed through command of reason. In this way, therefore, gifts of the Holy Spirit have themselves [se habent] with respect to the human being in relation to the Holy Spirit, as moral virtues have themselves [se habent] with respect to the striving impulse in relation to reason. Now moral virtues are sorts of habitudes by which striving impulses are disposed to obeying reason promptly. Thus also gifts of the Holy Spirit are are sorts of habitudes by which a human being is completed to for promptly obeying the Holy Spirit.
To the first therefore it must be said that Gregory answers it there, saying that in those gifts without which one is not able to reach life, the Holy Spirit always remains in the chosen, but in others He does not remain. Now the seven gifts are necessary for salvation, as has been said. Thus, regarding them, the Holy Spirit always remains in the holy.
To the second it must be said that the reason proceeds from an instrument that is not for acting but only for being acted upon. But a human being is not such an instrument, but he is activated by the Holy Spirit, who also acts, inasmuch as he has free choice. Thus he needs habitude.
To the third it must be said that prophecy is among the gifts that are for the manifestation of the Spirit, but not for the necessity of salvation. Therefore it is not similar.
[Thomas Aquinas, ST 2-1.68.3. The Latin is here, the Dominican Fathers translation is here.]
I skipped article 2, on the necessity of the Gifts for salvation; it is useful for understanding why they are important, but less so for understanding how they work as habitudes, although, of course, it is relevant to the second and third objections here.