Gatha is a type of poetry that comes from Buddhist scriptures. It turns out to be a special kind of poetry belonging to ancient Indian Buddhism. The characteristic is that each sentence has the same number of words, but does not pay attention to rhyme or evenness.
After Buddhist scriptures were introduced to China, Buddhists in Chinese history often added rhyming features to their verses. For example, in the "Sixth Patriarch's Altar Sutra", there are many verses composed by the Sixth Patriarch Huineng, many of which are Rhyming.