Greek musical medicine was centered on the four elements: air, water, fire and earth. Chronic health problems were said to originate in an imbalance of these elements. Too little or two much of any element (or humour, but I'll stick with element--less confusing!) was said to create a state of dis-ease. With four elements and two ways to be imbalanced, there were eight states of disease recognized in this system of medicine. Greek music consciously used eight modes, or prescribed combinations or intervals of notes included in a tune, to address disease. The purpose of music in these medical modes was either to increase or decrease the element which was out of balance.
Whatever we think of this medical practice, the early Church thought highly enough of it to adopt the therapeutic modes for use in their music, renaming them Church Mode I, II, III, and so on.* The Gregorian chants were all built on these modes, and the mass and the liturgy rotated through the modes and were designed in a sense to offer healing to hearers.
*If you like to use multi-syllabic words that are largely obscure except to certain musicians, the Greek names of the modes are Dorian, Lydian, Phrygian, and Mixolydian--each intended to increase one of the elements. Their companion modes are meant to decrease one of each of the elements: Hypodorian, Hypolydian, Hypophrygian, and Hypomixolydian.