Midnight Mass on Christmas is an old tradition, based on the belief that Christ was born at midnight. We really don't know the time of his birth, but the origins of this tradition may lie in a passage from Wisdom (18:14-15):
For when peaceful stillness compassed everything and the night in its swift course was half spent, your all-powerful word leaped from heaven . . .
In the early Church, midnight was not assigned as the precise time for the first Christmas Mass. It was simply to be celebrated "during the night." Later regulations said it was to be "ad galli cantum" ("when the rooster crows"), which was more towards 3 AM. Spanish-speaking people still refer to the midnight or early morning Christmas Mass as the "Misa de Gallo" ("Mass of the Rooster").
Since about the end of the first millennium, the custom developed of celebrating three Masses, beginning at midnight.
The first was called the "Mass of the Angels" because the Gospel was from Luke's account of the angel's announcement to the shepherds.
The second was called the "Shepherd's Mass" because the Gospel was the account of the shepherds' visit to the manger.
The third was called the "Mass of the Divine Word" because the Gospel was from the prologue of John -- "And the Word became flesh . . ."
SOURCE: The Little Blue Book: Advent and Christmas Seasons 2019-2020, 12/24/2019.
"Building our Catholic faith one question at a time."