It is said that Purgatory has its origins in Judaism, but there is no third place (in addition to heaven and hell) in Jewish theology. There is a temporary purification process, however, which occurs in Gehinnom - the Jewish understanding of hell - which rids the soul of spiritual blemishes before it returns to God. (The Yiddish word for this place is Gehenna). For many observant Jews, purification in Gehinnom/Gehenna is actually the beginning of a righteous persons reward.
Using non-theological words and descriptions, Rabbi Benjamin Blech attempts to demystify this purifying process in Understanding Judaism:
The Jewish faith embraces the idea of heaven - although we cant describe it, we know its a wonderful place...Hell also exists, but not in the way its usually described, as a place of torture and burning with fire...The closest we can come to understanding it is that its a place where we are estranged from God and our souls are purified from their sins...The maximum time for anyone to have his or her soul purified in this place is 12 months. Very righteous people might possibly have overnight cleaning service. How long the process takes depends on how much has to be done. Its only the very worst of all people who require the entire year for their purification. (Blech, Understanding Judaism, page 222)
St. Augustine - an early church father - also wrote about a purifying process after a persons death. One of the most influential Christian thinkers of all time, Augustine (who became Bishop of Hippo in North Africa) wrote his masterpiece, The City of God, in the early 5th century. Except for the Bible, few books - if any - had greater influence on people living in the Middle Ages.
Does Augustine discuss "Gozzoli Augustine in Rome" a concept that sounds like Purgatory? In "Book XXI," near the end of The City of God, he observes:
But temporary punishments are suffered by some in this life only, by others after death, by others both now and then; but all of them before that last and strictest judgment. But of those who suffer temporary punishments after death, all are not doomed to those everlasting pains which are to follow that judgment... (City of God, page 784)
If not an actual place, as understood by ecclesiastical authorities in the Middle Ages, Purgatory at least appears to have ancient conceptual roots.