If we were to withdraw the annual contributions from our Roth IRAs for the closing costs on a house (we have a 20% down payment, but only recently learned that that's almost $10,000 less than what you actually have to put down) would we be able to make up the money we withdrew? Or would we still constrained by the annual $5000 contribution limit?
Whenever one takes a distribution from an IRA, it cannot be put back into an IRA unless one is doing something like (a) take a distribution from the IRA as a rollover where the owner gets cash in hand to be sent to the new IRA custodian within 60 days, and (b) deposit the money with the new IRA custodian within the prescribed time period. For distributions taken by a first-time home purchaser to buy or rebuild a home, the money can be put back and treated as a rollover up to 120 days after receiving it (Publication 590, page 51, column 2). Note also that distributions taken for first-time homebuying lose their Qualified Distribution status if not paid to the seller (or bank, for closing costs etc) within 120 days of receipt of the distribution (Publication 590, page 51, column 1). However, one cannot take a distribution from an IRA, no matter whether the sum comes from contributions, earnings, or previous rollovers, and put the money back into the IRA a few years down the road as having been unnecessarily withdrawn.
What you want to do -- take out some money out of your IRA to buy a house and put the money back into the IRA later -- is effectively an interest-free loan from your IRA (even if you don't call it a loan or think of it as a loan), and you are not allowed to do this (except in the special circumstances described above). On the other hand, unless you have a very atypical 401k plan, you can take a loan from your 401k (you will have to pay interest, though) and pay it back over several years. Thus, taking a loan from your 401k might be something you could consider as an alternative to withdrawing money from your IRA. But be aware that there are restrictions on how much you can borrow from your 401k, and usually you cannot withdraw employer match money, even if it has vested. Also, the loan becomes immediately due upon termination of employment, even if the termination was involuntary (i.e. the employee was laid off or fired).
This answer comes from my interpretation of Publication 590 (2011), Individual Retirement Arrangements (IRAs) and particularly What Are Qualified Distributions? section. Please consult the sources yourself or with the help of a qualified professional before doing anything.
First, note that due to the rollover loophole, you can take out the money and repay it within 60 days. Missing the deadline would mean paying the taxes on the withdrawal in addition to a 10% penalty. As per JoeTaxpayer's notes below, this applies to the earnings on the account only. The contributions themselves can be withdrawn without penalties (thanks, Joe!).
Second, you might qualify to withdraw 10k for a qualified first-home house purchase. Qualified, in this case, would mean first-time home purchase by yourself, your spouse, your child, parent, or grandchild, made within 120 days of withdrawal (see first home in the above document).
Finally, nothing is mentioned about the withdrawal affecting your yearly contribution cap. Any new money coming into the account is new money counted towards the contribution cap (except for the 60 day loophole).
To answer your question then: you can make up the money only under the first scenario (60 day loophole). Qualified withdrawals allow you to avoid the penalties, but as far as I can tell, do not affect the contribution cap.
There are a few other details that may depend on your age, reservist status, health, etc. Read the document carefully to see if any of those apply to you.