Everyone thinks Halloween is the Irish Feis Samhain, which began at sunset on 31 Oct and that the Church co-opted the date. However, the feast "in honor of all the saints in heaven" was originally 13 May, and Pope Gregory III (d. 741) moved it to 1 Nov to mark the dedication day of All Saints Chapel in St. Peter’s at Rome. There was no connection to distant Irish customs, and the parishioners of St. Peter would not likely have been beguiled by it. Not until the 840s, did Pope Gregory IV declare All Saints to be a universal feast, not restricted to St. Peter's. The holy day spread to Ireland.
The day before a feast is the "vigil mass" and so after sunset on 31 Oct became "All Hallows Even" or "Hallowe’en." It had no more significance than the "Vigil of St. Lawrence" or the "Vigil of John the Baptist" or any of the other vigils on the calendar.
In 998, St. Odilo, the abbot of the powerful monastery of Cluny in Southern France, added a celebration on Nov. 2. This was a day of prayer for "the souls of all the faithful departed." This feast, called All Souls Day, spread from France to the rest of Europe.
That took care of Heaven and Purgatory. The Irish, being the Irish, thought it unfair to leave the souls in Hell out. So on Hallowe'en they would bang pots and pans to let the souls in Hell know they were not forgotten. However, the Feast of All Damned never caught on, for fairly obvious theological reasons. The Irish, however, had another day for partying.