The practice of offering Gregorian Masses for the repose of the soul of a deceased person was started by Pope Saint Gregory the Great, who ruled the Church from 590 to 604. The event that started this pious practice took place while he was abbot of St. Andrew’s monastery in Rome, prior to his election to the papacy.
In the fourth book of his Dialogues, St. Gregory relates how one of the monks of his monastery, named Justus, did not keep his vow of poverty very well. When Justus died, St. Gregory feared that the good monk might have to spend a long time in Purgatory because of his failures with regard to poverty. He therefore ordered that, the Holy Sacrifice of the Mass be offered up for Justus for thirty consecutive days. On the thirtieth day, Justus appeared to Copiosus, a brother monk, telling him that he was now freed from his sufferings because of the thirty Masses that St. Gregory had ordered to be said for him.
Following St. Gregory’s example, catholic people throughout the ages have continued the pious custom of having thirty Masses said for their departed relatives and friends. The custom of praying thirty days for the dead can be traced back to the Old Testament (Deuteronomy 34:8). The Sacred Congregation on Indulgences has declared, “The offering of Gregorian Masses has a special efficacy for obtaining from God the speedy deliverance of a suffering soul, and that this is a pious and reasonable belief of the faithful.”