The ending -mas on Christmas and some other festivals, eg Michaelmas and Martinmas, comes from the word 'mass', meaning church service or festival, and the OED's definition is: 'Forming nouns denoting ecclesiastical festivals, of which the initial element is usually the name of the person or persons in whose honour the festival is held'.
Words ending -mas date back to the Old English period, but, until about the 15th century, they were still spelt with two Ss. There have been many spellings of Christmas over the centuries: Cristesmesse (the 'es' being a genitive form), Cristmasse, Crystmasse, Crysmas, Cristmas with the spelling finally settling down in the 17th century.
The first half of words ending -mas is usually a person's name (Lukesmas and Georgemas are also in the OED), but not always - there's Lammas and Candlemas, for instance.
A Merry Christmas to readers on this Christmas Eve.