The Tradition of Midnight Mass
In the early history of the Church, vigils were held before every feast for the purpose of preparing for the feast itself. Mass would be held in the evening, followed by a period of prayer and contemplation. Solemn services were then held the next morning. As more feasts arose, the number of vigils kept was decreased. In the current Roman Calendar, there are six Masses designated as vigils to proceed the feasts the next day: vigils for Easter, Christmas, Pentecost, Ascension, Nativity of St. John the Baptist, and the Feasts of Saints Peter and Paul. Vigil Masses are so designated because their propers and readings differ from the Masses for those feasts themselves, while remaining tied to the feasts. Vigil Masses therefore differ from normal anticipated Masses, which are the same as the Mass taking place the next day, but held the preceding evening.
The vigil Mass for Christmas, held Christmas Eve, also differs from the Christmas Midnight Mass. Christmas Day actually has three separate Masses that are or can be held, in addition to the vigil – at midnight, at dawn, and during the day. It is not known exactly how the tradition of the three Masses originated, as even the origin of the feast of Christmas itself isn't certain – depending on the city, something resembling a Christmas celebration started in different years (and at varying times of the year, as well). By the end of the fourth century it was almost universally held on December 25, with Rome having started celebrating it on that date before 354, and Constantinople not before 379. The celebration of Epiphany on January 6 had previously been the major Christmas-like celebration, but once December 25 became the widely agreed-upon date of Christmas the celebrations moved to that date as well.
In the 380s, a Christian woman named Egeria made a pilgrimage to Jerusalem, observing for three years and keeping a journal of the customs and liturgies she saw there. She witnessed the Christians celebrating the birth of Christ on January 6, since it appears the tradition of celebrating Christmas on December 25 had not yet begun there, beginning with a midnight vigil in Bethlehem, which was followed by a torchlight procession to Jerusalem culminating with a gathering in Jerusalem at dawn. When the basilica of St. Mary Major was built in Rome around 430, Pope Sixtus III included a replica chapel of the Bethlehem cave where Jesus was born, and much like had been the practice in Jerusalem when Egeria visited, he instituted the celebration of a midnight Mass in this chapel.
Around 550 AD, the Pope began to celebrate a Mass in the Church of St. Anastasia before dawn on Christmas Day, initially because the feast of St. Anastasia was celebrated on December 25. Eventually, though, this evolved into a second Christmas Mass that seemed to replicate the dawn celebrations that Egeria witnessed in Jerusalem. This Christmas Mass would be followed by the Pope going to St. Peter's to celebrate the dawn office of Christmas with the faithful. Until sometime before 1156, only Popes were allowed to celebrate the three Christmas Masses, but by 1156 there is evidence that priests began to say all three as well, which still occurs today. A single priest can celebrate all three Christmas Day Masses, provided they follow the correct times (midnight, dawn, and sometime during the day). The midnight Mass is different from Christmas vigil Masses held earlier in the evening of Christmas Eve. Any of the four types of Christmas Masses (vigil, midnight, dawn, or day) is valid for fulfilling the Christmas Mass obligation.