Gāthā is a Sanskrit term for "song" or "verse", especially referring to any poetic metre which is used in legends, and is not part of the Vedas but peculiar to either Epic Sanskrit or to Prakrit. The word is originally derived from the Sanskrit/Prakrit root gai, which means, to speak, sing, recite or extol, cognate to the Avestan term gatha.
The stanzas of the Prakrit dialects of Ardhamagadhi, Sauraseni and Pāli are known as gathas as opposed to shlokas and sutras of Sanskrit and dohas of Apabhramsha. Most of the Jain and Buddhist texts written in Prakrit are composed of gathas (or verses/stanzas).
Thus, gatha can mean any Prakrit and Pali verses in general, or specifically the arya meter of Sanskrit, versified portions of Pali canon (Tipitaka) of Theravāda Buddhism are also specifically called gathas.
In contemporary Buddhist practice as popularized (and derived from the Zen and Theravādin traditions) by Zen Master Thich Nhat Hanh, a gatha is a verse recited (usually mentally, not aloud) in rhythm with the breath as part of mindfulness practice, either in daily life, or as part of meditation or meditative study.