You will need to pay federal income tax on the amount withdrawn plus an early withdrawal penalty. (For me, this amounted to 20% for the former and 10% for the penalty, a total of 30% of the amount withdrawn.) Your 401(k) advisor can walk you through the process. It stings to lose 30%, but in some cases, it's clearly the best option. You should also begin communicating with your credit card companies to see if you can negotiate a lower rate or better terms (lower payment). Good luck to you and your wife.
It is possible to borrow against your 401(k) you can also withdraw money for certain qualified emergencies but unless it is a Roth 401(k) then you will also have to pay tax at the time of the withdrawal.