I think the time has come for the government to step out of marriage altogether. Let the churches decide who can be "married" - but the government would only recognize "civil unions." This seems like the most acceptable compromise that respects freedom of religion while also respecting equality under the law.
Yes, this change would theoretically, and slightly, undermine the traditional purpose of marriage: Government incentivized marriage between men and women for the purpose of encouraging strong family units for the creation and raising of children. Some gays might adopt children - most won't. But moving away from this historical purpose of joining two people together under the law is really just a mosquito bite compared to what has really weakened marriage and the family unit. I'm referring, of course, to no-fault divorce. That genie is already out of the bottle.
On the whole, it is more important to allow gay couples the same benefits under the law - when it comes to taxes, probate, benefits, adoption, etc. The churches would keep the "marriage" ceremony.
The only downside is that, once we take this step to civil unions, I can't formulate a logical argument against allowing 3 or 4 or more people - gay or straight - to enter a civil union.
But all this is hypothetical because the Supreme Court is in all liklihood going to totally eff this all up.