From the Catholic Guy:
The days of the dead center around All Saints' Day (also known as All Hallows') on November 1, when we celebrate all the Saints in Heaven. On the day after All Hallows', called "All Souls' Day," we remember the saved souls who are in Purgatory, being cleansed of the temporal effects of their sins before they can enter Heaven. The day that comes before All Hallows', though, is one on which we unofficially remember the damned and the reality of Hell. The schema, then, for the Days of the Dead looks like this:
31 October:
Hallowe'en: unofficially, per folk custom, recalls the souls of the damned. Practices center around recognizing and remembering the reality of Hell and how to avoid it.
1 November:
All Saints': set aside to officially honor the Church Triumphant (the souls in Heaven). Practices center around recalling our great Saints, including those whose names are unknown to us and, so, are not canonized
2 November:
All Souls': set aside officially to pray for the Church Suffering (the souls in Purgatory). Practices center around praying for the souls in Purgatory, especially our loved ones
The earliest form of All Saints' (or "All Hallows'") was first celebrated in the 300s, but originally took place on 13 May, as it still does in some Eastern Churches. The Feast first commemorated only the martyrs, but came to include all of the Saints by 741. It was transferred to 1 November in 844 when Pope Gregory III consecrated a chapel in St. Peter's Basilica to All Saints (so much for the theory that the day was fixed on 1 November because Irish pagans had harvest festivals at that time).
All Souls' has its origins in A.D. 1048 when the Bishop of Cluny decreed that the Benedictines of Cluny pray for the souls in Purgatory on this day. The practice spread until Pope Sylvester II recommended it for the entire Latin Church.
The Vigil of -- i.e., the evening before -- All Hallows' ("Hallows' Eve," or "Hallowe'en") came, in Irish popular piety, to be a day of remembering the dead who are neither in Purgatory or Heaven, but are damned, and these customs spread to many parts of the world. Thus we have the popular focus of Hallowe'en as the reality of Hell, and hence its scary character and focus on evil and how to avoid it, the sad fate of unsaved souls, etc.
One hears too often from the secular world that "Hallowe'en is a pagan holiday" -- an impossibility because "Hallowe'en," as said, means "All Hallows' Evening" which is as Catholic as it gets. Some say that the holiday actually stems from Samhain, a pagan Celtic celebration, or is Satanic, but this isn't true, either, any more than Christmas "stems from" the Druids' Yule, though popular customs that predated the Church -- such as the use of holly to decorate -- may be involved in our celebrations (it is rather amusing that October 31 is also "Reformation Day" in Protestant circles -- the day to recall Luther's having nailed his 95 Theses to Wittenberg's cathedral door -- but Protestants who reject Hallowe'en because pagans do things on October 31 don't object to commemorating that event on this day).