Imam ibn al-Qayyim explains the meaning of gratitude to Allah and how to display it:
Definitions of gratitude to Allah:
1- To admit Allah’s bounties upon you out of submission.
2- To praise Allah by pointing out His bounties.
3- Devotion of the heart to loving Allah, devotion of the body to worship him, remembering and praising Him with tongue.
4- A nice definition is given by Hamdoon al-Qassar: showing gratitude to Allah is achieved by believing that the person doesn’t deserve these bounties.
5- Showing gratitude is to admit your inability of showing gratitude.
How to display your gratitude to Allah:
1- To submit to Allah.
2- To love Allah.
3- To admit His bounties.
4- To praise Him with these bounties.
5- To function these bounties in what pleases Allah not in what displeases Him.
If any of these pillars were to be neglected, gratitude would be breached.”
Source: Madrij as-Salikeen: (2/6-7)