"Many of the ancient peoples of Europe marked the end of the harvest season and the beginning of winter by celebrating a holiday in late autumn. The most important of these holidays to influence later Halloween customs was Samhain, a holiday observed by the ancient Celts. Among the Celts, Samhain marked the end of one year and the beginning of the next.
Samhain began at sundown on October 31 and extended into the following day. According to the Celtic pagan religion, known as Druidism, the spirits of those who had died in the preceding year roamed the earth on Samhain. The Celts sought to ward off these spirits with offerings of food and drink. The Celts also built bonfires and performed rituals, often involving sacrifices.
By the end of the 1st century AD, the Roman Empire had conquered most of the Celtic lands. In the process of incorporating the Celts into their empire, the Romans adapted and absorbed some of their traditions as part of their own pagan and Catholic religious observances.
Celtic influences lingered a long time in the western fringes of Europe and Samhain was abandoned only when the local people converted to Christianity during the early Middle Ages. The Roman Catholic Church often incorporated modified versions of older religious traditions in order to win converts. An example is when Pope Gregory IV sought to replace Samhain with All Saints’ Day in 835. All Souls’ Day, closer in spirit to Samhain and modern Halloween, was first instituted at a French monastery in 998 and spread quickly across Europe. Folk observances linked to these Christian holidays, including Halloween, thus preserved many ancient Celtic customs associated with Samhain."