Hanukkah, the Jewish festival of lights, dates back to 167 BCE. The story is based largely by legend, as few historical details remain.
At the time, the Jews were living in Israel, under the control of the Syrian-Greek king Antiochus Epiphanes. Antiochus' reign brought with it a violent attempt to force the Jews in the kingdom to assimilate to Greek cultural norms.
The breaking point came in 165 BCE, when Antiochus placed an altar to Zeus in the Temple Mount in Jerusalem. A group of brothers, called the Maccabees, led a revolt against Antiochus and liberated the temple, getting rid of the idols that Antiochus had installed there.
When the Maccabees took the temple, they cleansed it, building a new altar to replace the old one. The menorah was to be lit and stay lit continuously through the night, but there was only enough olive oil to last a single day.
Miraculously, the single day's worth of oil burned over the course of 8 days, long enough for new oil to be brought to the temple so the menorah could stay lit, and the temple was rededicated to Judaism.
Upon the temple's rededication, the Maccabees decided to celebrate (belatedly) the harvest festival of Sukkot — due to Antiochus' having defiled the temple, the temple had been unusable for that year's Sukkot. They then instituted an annual winter holiday to commemorate the rededication of the temple and the miracle of the oil.
The oil plays a big role in the traditional foods of Hanukkah; foods cooked in oil (often olive oil, but chicken fat in parts of Eastern Europe where olives were hard to come by) are a major part of the celebration.
The two mainstays of Hanukkah food are the latke (a potato pancake fried in oil) and sufganiot (oil-fried jelly donuts).