It is truly remarkable how often giving thanks and prayer are linked together in Scripture.
Here are just a handful of examples:
I thank my God in all my remembrance of you, always in every prayer of mine for you all making my prayer with joy, because of your partnership in the gospel from the first day until now. (Philippians 1:3-5 ESV)
do not be anxious about anything, but in everything by prayer and supplication with thanksgiving let your requests be made known to God. (Philippians 4:6 ESV)
For what thanksgiving can we return to God for you, for all the joy that we feel for your sake before our God, as we pray most earnestly night and day that we may see you face to face and supply what is lacking in your faith? (1 Thessalonians 3:9-10 ESV)
Rejoice always, pray without ceasing, give thanks in all circumstances; for this is the will of God in Christ Jesus for you. (1 Thessalonians 5:16-18 ESV)
And if you add to that the dozens of times that the Psalms speak of giving thanks to the LORD (e.g. Psalm 7:17; 9:1; 30:4; 33:2, etc.), the list gets even longer. After all, in a sense, many of the Psalms are both songs and prayers, where God is addressed.
You can’t really give thanks without praying. (To give thanks to God is to pray!)
And you probably won’t persevere very long in prayer if your heart is not filled with gratitude to God for all of the blessings that He has bestowed on You in Jesus Christ.
No wonder that the Heidelberg Catechism calls prayer “the most important part of the thankfulness God requires of us” (Q.116).