Many in the spiritual community like to explain this phenomenon in their own unique way, though so do all those motivational speakers, who succeed in no small part thanks to the teaching of gratitude. But at the end of the day, we humans are too much the image of the Creator to simply have this gift without understanding it.
To get what exactly the trick is, we first must look at how we accomplish our goal: using gratitude to improve our lives. This is a form of active spiritual alchemy, because it involves the conscious decision to break our normal thought pattern and introduce something else. To do this, we take a deep breath, and disconnect from our usual concerns, ponderings, and plans. Instead, we listen and observe our immediate environment, taking note of every detail we can, all while feeling our energy, our consciousness, dance across and experience the landscape. Out loud, give thanks for this moment of peace. Feel thankful for the respite, and feel love for the life you've lived that has come to this point.
Such a little ritual, that when done often enough, sends a message that you are a grateful being, ready to receive more. That you will appreciate the things given to you, so you deserve them. As you come to believe this too, you'll find that what you have will always feel like enough, while also always being excited for what might be just around the corner!
While there are more intricate ceremonies and candle-burning which can take hours, this short and simple ritual creates tangible effects almost from the very beginning, and as the cultivation of gratitude grows, the practitioner will have an easier time recognizing both when to thank the powers that be, and when that presence has answered with abundance. I cannot quite put into words all this means, but I have concluded that, at the bare minimum, this must mean that the universe is alive, and we are simply a part of it, a complex part which can ultimately communicate to that mystical force our desires, emotions, and intentions, all while changing our environment with our own work. That alone is enough to be grateful for.