René Descartes said this quote

Gratitude is a species of love, excited in us by some action of the person for whom we have it, and by which we believe that he has done some good to us, or at least that he has had the intention of doing so. Passions, III, 193. XI, 473-474. Trans. John Morris