The following set of passages are some remaining examples of people giving thanks in the gospels. We've already seen Jesus giving thanks, but now we turn to others.
The first passage is the account of Anna the prophetess. She had been a widow for eighty-four years, after having been married for seven years. This extremely elderly lady had been fasting and praying in the temple. When Jesus was brought to her, she gave thanks to the Lord and testified of Jesus to all those in Jerusalem who were seeking redemption. We too should give thanks that Jesus has come, especially since we have been privileged to see this from our earliest years, rather than having to wait until we are over a century old to see the Messiah arrive.
The second passage records Jesus' healing of ten lepers. They all cried out for mercy from Jesus, and Jesus healed them, not immediately but as they were going to the priest as he had instructed. One of them noticed on the way that he had been healed and returned and thanked Jesus, and he was a Samaritan. We too should be thankful to God for the healing that we receive from our sins. It is important to ask God for mercy, as the lepers did, but it is also important to thank God for the good things He does.
The final passage is a parable that Jesus spoke. This is a parable against those who "trusted in themselves that they were righteous." Sadly, we see this sort of thing today in Roman Catholicism. The person trusting in himself is the Pharisee in this parable. He is not a Pelagian, for he thanks God that he is not like other men, but he is a semi-pelagian in that he views himself as actually and personally righteous in God's sight. This sort of thanks is an empty thanks. It is good to thank God, but the thanks of the person who trusts in himself that he is righteous is not praised by Jesus but condemned. Instead, the justified man is the one who says "God be merciful to me a sinner," recognizing his actual sinfulness before God and begging for mercy. That is what "Kyrie Eleison" ("Lord have mercy") embedded in so many old liturgies, is designed to remind one of - even in churches that have lost track of its meaning. Humble yourself, recognize your actual sinfulness, and trust in Christ alone for salvation, and God will impute Christ's righteousness to you.
And there was one Anna, a prophetess, the daughter of Phanuel, of the tribe of Aser: she was of a great age, and had lived with an husband seven years from her virginity; and she was a widow of about fourscore and four years, which departed not from the temple, but served God with fastings and prayers night and day. And she coming in that instant gave thanks likewise unto the Lord, and spake of him to all them that looked for redemption in Jerusalem.
And it came to pass, as he went to Jerusalem, that he passed through the midst of Samaria and Galilee. And as he entered into a certain village, there met him ten men that were lepers, which stood afar off: and they lifted up their voices, and said, Jesus, Master, have mercy on us.
And when he saw them, he said unto them, Go shew yourselves unto the priests. And it came to pass, that, as they went, they were cleansed.
And one of them, when he saw that he was healed, turned back, and with a loud voice glorified God, and fell down on his face at his feet, giving him thanks: and he was a Samaritan.
And Jesus answering said, Were there not ten cleansed? but where are the nine? There are not found that returned to give glory to God, save this stranger. And he said unto him, Arise, go thy way: thy faith hath made thee whole.
And he spake this parable unto certain which trusted in themselves that they were righteous, and despised others: two men went up into the temple to pray; the one a Pharisee, and the other a publican.
The Pharisee stood and prayed thus with himself, God, I thank thee, that I am not as other men are, extortioners, unjust, adulterers, or even as this publican. I fast twice in the week, I give tithes of all that I possess.
And the publican, standing afar off, would not lift up so much as his eyes unto heaven, but smote upon his breast, saying, God be merciful to me a sinner.
I tell you, this man went down to his house justified rather than the other: for every one that exalteth himself shall be abased; and he that humbleth himself shall be exalted.