The Catholic Encyclopedia explains this ancient tradition as follows:  “Gregorian Masses consist of a series of thirty Masses offered on consecutive days for the soul of a deceased person.  They receive their name because of a story written by Gregory the Great (died 604) in the DIALOGUES (4:55; PL 77: 416-421) about a Monk who obtained release from Purgatory after thirty Masses were offered on his behalf.  On two occasions, the Sacred Congregation on Indulgences (March 15, 1884; August 24, 1888) declared the confidence of the faithful in the efficacy to God’s mercy and good pleasure, and asserted their approval by the Church.”