Enter his gates with thanksgiving, and his
courts with praise! Give thanks to him;
bless his name!
The inspired psalmist says that we cross the threshold of God's domain by thanking him and we get into His dwelling place with praise. When you are calling upon the King of all, isn't it absurd to begin with a complaint, a request, or even a confession? Beginning with thanksgiving and praise establishes the relationship. It states the obvious, but it also states reality. And this establishing is for your benefit. God already is firmly established in his identity. We have to re-establish it in ourselves as long as we're alive on earth.
To try to come into God's presence without thanksgiving and praise is to implicitly take God for granted or deny his God-ness. Your heart is not in alignment and your words do not connect with God. God still hears your prayers, but you don't get into God's presence.