The word "Halloween" is a corruption of "All Hallows' Eve," the day before All Saints' Day, and it was initially a Catholic high feast day as well as a minor Celtic feast day. Medieval Catholics believed this was the night spirits were free to roam the earth.
All Saints' Day, originally celebrated on May 13, was moved to November 1 during the 8th century by Pope Gregory III to commemorate the dedication of All Saints Chapel in Rome. In the 10th century, St. Odilo in France began to celebrate All Souls Day on November 2, honoring the faithful dead who were in purgatory or heaven. Celtic peasants in Ireland were bothered by this, as it ignored the dead who were in hell, so they started celebrating All Souls' Eve on October 31, banging pots and making a racket so the dead were aware that they, too, were remembered. Over time, this tradition spread throughout Europe, picking up other traditions such as dressing in costumes to fool Death, or spirits. Eventually all things creepy, scary or evil became associated with this day, as did the Guy Fawkes Day tradition of demanding treats in lieu of being tricked.
Halloween's roots are often hotly contended between Catholics and secular scholars, with secular scholars insisting that Halloween is entirely a pagan festival. It is most likely that both sides are correct, and Halloween is an amalgam of Christian and pagan tradition.