Gratitude is made up of admiration and joy.
The admiration is for the goodness in another who one considers to be praiseworthy; and the joy is for the occurence of an event one considers to be desirable.
The part of one's faculty of judgment that is operating in the sensation of gratitude differs from the part of one's faculty of judgment operating in the sensation of preference. Gratitude directs itself to a judgment about one's condition rather than to a judgment about one’s appetites.
The difference between appetites and passions is the difference in style of judgment between market-based hunger and gift exchange-based passion.