Most folk know that Halloween has morphed from the the old Irish festival of Samhain, which was the night when the world of the dead intersected with that of the living. To keep the spirits from roaming the earth (and to keep themselves from wandering into the otherworld) the farmers would gather around a bonfire, some dressed in masks and costumes, in an effort to get through the night with their ancestors by hook or crook.
But what many don't know is that the holiday thrived and survived thanks to the papal theory that "if ya can't beat 'em, join 'em."
In the middle ages when the economy was agrarian, pagan harvest rites like Samhain continued unabated no matter how much the Church tried to squelch them. All focused on the dead; after all, it was tied into the season when the earth's bounty began dying.
Surprisingly, it's thought by many that the All Hallows (Saints) holiday, the church's effort to co-opt the pagan rites, wasn't first aimed at the Irish, but the Romans.
In the early seventh century, the Romans celebrated the Feast of the Lemures, which featured rituals such as bean offerings to the dead, walking around in circles at midnight, banging brass pots and asking your departed relatives to stay wherever they were. And it culminated on May 13th, not the end of October.
Pope Boniface IV decided to usurp the pagan's dead day with a Christian holiday, and declared an All Martyrs day on the same date. It seemed to work; after a century or so, Popes Gregory III & IV decided to try the same trick and moved the holiday to November 1st, not only to counteract Samhain but several other autumn pagan rituals common in Northern Europe. They renamed it All Hallows Day. (It was actually celebrated at the same time, as the Church holiday began at sundown.)
Our most recognizable Halloween custom sprang from the church-sponsored holiday. Catholic dogma taught of a nether world for the dead called purgatory, a not-so-pleasant half-way house on the way to heaven. And since the souls there couldn't do much to advance their cause, their fast track to the Pearly Gate was greased through prayers from the living.
So a custom sprang up called "souling." Beggars would door knock for sweets - a fruit cookie of sorts called a "soul cake" - and in exchange for the pastry promised to pray for departed souls. That practice morphed into today's trick or treating.
The church also introduced the association of witches with the holiday. They weren't really part of the culture until the witch hunts of the Middle Ages, although their familiars seem to have a long history of causing panic. The black cats were especially dreaded by the superstitious because all that could be seen of them at night were their seemingly disembodied glowing eyes.
But many of the customs remain from the old days as the church couldn't entirely dig out the pagan roots of Halloween. Skeletons were used from the beginning, some even being propped up on window sills to keep the dead at bay. Ghosts and the undead, of course, were the reason d 'etre of the pagan rites. Costumes and masks were worn by the Druids and their followers. And the jack-o-lantern was handed down through Irish folklore.
So there it is. Halloween is a tangled weave of Christian and pagan ritual and belief. Still, it's kinda hard to imagine that a bag of candy and Freddy Krueger was what the Vatican and Druids had in mind all those centuries ago. C' est la vie.