This is an updated version of a post from my own blog written prior to Thanksgiving:
As Aquinas puts it in the Summa Theologiae, "Whether thankfulness is a virtue, distinct from the other virtues?" For Aquinas, the answer is yes, because thankfulness is "a special part of justice." Giving thanks to our benefactors, i.e. those who have given us a particular and personal favor, is an issue of obligation, or justice. We owe gratitude to them, and this is different from the related virtues of religion (owed to God), piety (owed to parents), and observance (owed to those who excel in dignity). We are left with thankfulness as a virtue distinct from these related excellences of character. His answer here only makes sense in light of the specific objection he is considering, as Aquinas distinguishes character traits by their objects, and it is on this basis that he claims a distinct role for thankfulness as a matter of justice.
The point, I take it, is that Thomas believes that gratitude is important in a variety of ways, related to God, parents, excellent human beings, and finally those who have benefitted us via a favor of some sort. We owe something to all of these persons, according to Thomas. One can see why we owe something to God, parents, and our benefactors, but why to excellent persons? I think we owe them gratitude for showing us how to live a human life in a way that is conducive to human flourishing. I think of people I know that have shed light on this by their example, and the claim that I owe them thanks seems very plausible. So thanks to Jon Sederquist, J.P. Moreland, Lewis Winkler, Dave Dishman, Terry McKinney, and the many others who have done this for me.