The Federal Defense of Marriage Act sometimes referred to as DOMA, has also been found unconstitutional at the state appellate level, because it is the state’s right to determine the legal rights of marriage, and DOMA denies equal rights to same sex couples in states in which they are legally married.
The answer, as the California Supreme Court pointed out during the oral arguments leading to an earlier ruling upholding prop 8 pointed out, is to recognize the difference between legal marriage and religious marriage.
The Church has the right to marry only those whom it chooses to.
Advances in science and psychology show that that denying same sex legal marriage is an equal protection issue.
Just as the Church opposed interracial marriage and the abolition of slavery on scriptural grounds, it does so now with same gender marriage. Time will show that the Church is causing suffering with its anachronistic views. Going further back in history, we know that the Church opposed theories of Evolution and Natural Selection, and also tried people for heresy when they proposed a heliocentric planetary motion. This is just another in the long tradition of being out of sync with reality.
Regardless of how strongly some may hold their opinions, it seems pretty clear that it is simply a matter of time. Surveys show that 80% of people over 60 oppose gay marriage, while 80% of people under 30 support gay marriage. You would have seen similar poll results on interracial marriage in the 1950’s or 1960’s. I recall conversations with my grandmother who was born in 1894. On the topic of interracial marriage, the stopping point in the discussion was always, “It just isn’t natural. Anyone with any sense can see that. It is not what God intended.” No doubt, there have been popes who shared her view.