Exactly as the title asks; where do Catholics get their Scriptural support for the idea of Purgatory? To be more specific, how I think of Purgatory (which may be incorrect) is that it's a temporary place of suffering before one goes on to Heaven.
From what I understand, the idea behind Purgatory is that it is a place or state where sinful believers go before they are admitted to Heaven. It is believed that it is possible for the living to pray for and atone for the sins of the dead so they may be admitted into Heaven.
(Italics were added by me in the following)
a_hardin has it pretty well summed up.
There's also 1 Peter 3:18-20 (NIV) that supports this notion quite well.
These "imprisoned spirits" had to be somewhere.
It's a stretch to make it from this verse to the Catholic concept of Purgatory. However, this odd little section of scripture could easily be seen to support the concept of Purgatory.
There are a lot of scriptures that could reference purgatory, but nothing that outright says "when you die, you will go to a sort of holding place where you have to wait until all your sins have been repaid".
There was a large part of the Jewish tradition (and there may still be) that held with praying for people after they died. Gen. 50:10; Num. 20:29; Deut. 34:8 all reference times when that happened. And this probably played into the later beliefs by Catholic and Orthodox Christians in purgatory. I would point out, however, that as Jesus died to pay for our sins, all our debts have been paid and we have been washed clean so that we don't have to pay for them anymore.
Below you will find links to two different sites I looked at that had Biblical "references" and some of my own analysis based on the context of the verses and my own experience with the Bible.
The biggest Biblical support the article quotes is from 2 Maccabees, a book that most Protestants would not be familiar with as it is part of the Biblical apocrypha (referenced since the 5th century, but first separated from the rest of the Bible by Martin Luther in 1534). Most of the books called Apocryphal are recognized as canonical by the Catholic and Orthodox churches. Which is why those sects and not Protestant sects would hold to a doctrine supported by this verse.
The other verse referenced by the article is 1 Corinthians 15:29 which says
At best, this verse is a vague reference to baptizing dead people, where baptizing could be read as praying for the removal of sins. At worst, it's completely confusing and should not be used as the basis for a doctrine.
Matt. 5:26,18:34; Luke 12:58-59 - Are all in different parables and reference being punished for sin and getting out when you have repaid your debt. This could be a reference to purgatory, where you must remain until the debts of your sins have been paid. However, since Jesus died to pay for our sins, this is a case where the more clearly defined and supported doctrine would supersede a possible interpretation of a parable.
Matt. 12:32 - The argument here is that since it says they won't be forgiven in this world or the next, that means that it is possible to be forgiven "in the next". Some interpretations of the Bible say "this age or the next", "in this world or that which is to come", or "in this life or in the life to come" which seem to indicate when Jesus returns again rather than a world after death that is separate from Heaven or Hell.
Luke 16:19-31 - The rich man, from Hell, begs Lazarus to warn his brothers so that they don't end up there too. The Greek word used is hades which the Jewish people interpreted as a place of waiting for final judgement but is interpreted by Protestants to mean Hell.
Heb. 12:23 - The spirits of just men are made perfect. And this happens after their death, so that must mean it happens somewhere other than Heaven or Hell. OR it could happen before they get to Heaven so that when they are in Heaven they are perfect.
Rev. 21:4 - God shall wipe away their tears and there will be no more suffering. There's no suffering in Heaven and no wiping away of tears in Hell, therefore purgatory. OR for those who are still on Earth at the end times God will wipe away their tears.
Phil. 2:10 - Under the Earth means purgatory OR it could mean Hell.
There are more, but those are the ones that stood out to me.
I've also heard Luke 16:19-31 (the story of the rich man and Lazarus) used to explain Purgatory. Specifically Verse 23 "In Hades, where he was in torment, he looked up and saw Abraham far away, with Lazarus by his side."
Abraham had to be somewhere as he wasn't in Hades and couldn't be in Heaven yet.
Jesus speaks about repaying a debt:
Matthew 5:26 / Luke 12:59
That is evidence that there is a place you go, after you are judged where a payment is collected. That's the purification that happens in the state of purgatory.