Chanukah Origin Stories
גמ׳ אמר רב חנן בר רבא קלנדא ח' ימים אחר תקופה סטרנורא ח' ימים לפני תקופה וסימנך (תהלים קלט, ה) אחור וקדם צרתני וגו' ת"ר לפי שראה אדם הראשון יום שמתמעט והולך אמר אוי לי שמא בשביל שסרחתי עולם חשוך בעדי וחוזר לתוהו ובוהו וזו היא מיתה שנקנסה עלי מן השמים עמד וישב ח' ימים בתענית [ובתפלה] כיון שראה תקופת טבת וראה יום שמאריך והולך אמר מנהגו של עולם הוא הלך ועשה שמונה ימים טובים לשנה האחרת עשאן לאלו ולאלו ימים טובים הוא קבעם לשם שמים והם קבעום לשם עבודת כוכבים

GEMARA: Rav Ḥanan bar Rava says: When are these festivals celebrated? Kalenda is celebrated during the eight days after the winter solstice, and Saturnalia is celebrated during the eight days before the winter solstice. And your mnemonic to remember which festival is that the one that occurs after the solstice is mentioned first in the mishna, and the festival that takes place before the solstice is mentioned after, as in the verse: “You have hemmed me in behind and before, and laid Your Hand upon me” (Psalms 139:5), where the word “before” appears after the term “behind.” With regard to the dates of these festivals, the Sages taught: When Adam the first man saw that the day was progressively diminishing, as the days become shorter from the autumnal equinox until the winter solstice, he did not yet know that this is a normal phenomenon, and therefore he said: Woe is me; perhaps because I sinned the world is becoming dark around me and will ultimately return to the primordial state of chaos and disorder. And this is the death that was sentenced upon me from Heaven, as it is written: “And to dust shall you return” (Genesis 3:19). He arose and spent eight days in fasting and in prayer. Once he saw that the season of Tevet, i.e., the winter solstice, had arrived, and saw that the day was progressively lengthening after the solstice, he said: Clearly, the days become shorter and then longer, and this is the order of the world. He went and observed a festival for eight days. Upon the next year, he observed both these eight days on which he had fasted on the previous year, and these eight days of his celebration, as days of festivities. He, Adam, established these festivals for the sake of Heaven, but they, the gentiles of later generations, established them for the sake of idol worship.

מַאי חֲנוּכָּה? דְּתָנוּ רַבָּנַן: בְּכ״ה בְּכִסְלֵיו יוֹמֵי דַחֲנוּכָּה תְּמָנְיָא אִינּוּן דְּלָא לְמִסְפַּד בְּהוֹן וּדְלָא לְהִתְעַנּוֹת בְּהוֹן. שֶׁכְּשֶׁנִּכְנְסוּ יְווֹנִים לַהֵיכָל טִמְּאוּ כׇּל הַשְּׁמָנִים שֶׁבַּהֵיכָל. וּכְשֶׁגָּבְרָה מַלְכוּת בֵּית חַשְׁמוֹנַאי וְנִצְּחוּם, בָּדְקוּ וְלֹא מָצְאוּ אֶלָּא פַּךְ אֶחָד שֶׁל שֶׁמֶן שֶׁהָיָה מוּנָּח בְּחוֹתָמוֹ שֶׁל כֹּהֵן גָּדוֹל, וְלֹא הָיָה בּוֹ אֶלָּא לְהַדְלִיק יוֹם אֶחָד. נַעֲשָׂה בּוֹ נֵס וְהִדְלִיקוּ מִמֶּנּוּ שְׁמוֹנָה יָמִים. לְשָׁנָה אַחֶרֶת קְבָעוּם וַעֲשָׂאוּם יָמִים טוֹבִים בְּהַלֵּל וְהוֹדָאָה.
The Gemara asks: What is Hanukkah, and why are lights kindled on Hanukkah? The Gemara answers: The Sages taught in Megillat Taanit: On the twenty-fifth of Kislev, the days of Hanukkah are eight. One may not eulogize on them and one may not fast on them. What is the reason? When the Greeks entered the Sanctuary they defiled all the oils that were in the Sanctuary by touching them. And when the Hasmonean monarchy overcame them and emerged victorious over them, they searched and found only one cruse of oil that was placed with the seal of the High Priest, undisturbed by the Greeks. And there was sufficient oil there to light the candelabrum for only one day. A miracle occurred and they lit the candelabrum from it eight days. The next year the Sages instituted those days and made them holidays with recitation of hallel and special thanksgiving in prayer and blessings.