A decade ago marriage equality was a wedge on the Democrat Party in the USA, but now it is an electoral problem for the Republicans. (update: see article in NYtimes on how Obama benefited from the gay vote).
This is a generational question, young people are far more supportive of marriage equality than older people.
The Republicans' desire to wind back the welfare state has never been electorally popular. That's why Romney went well in the first presidential debate when he got all centrist, but his previous opposition to the auto bailout did him a lot of harm in the mid-West including the key state of Ohio.
Unable to sell their right wing economic agendas (which include winding back the Roosevelt and Johnson welfare policies) on their merits, Republicans ran on conservative moral values - particularly opposition to same sex marriage and abortion. Read books by Thomas Frank and Joe Bageant to understand how these appeals to conservative values induced millions of Americans to vote against their own economic interests.
Karl Rove mastered this approach for George W. Bush, motivating evangelical and fundamentalist Christians to get out and vote against the 1960s agenda of greater personal freedom, supposedly exemplified by those 'crazy' New York and Californian liberals.
Obama's re-election was based on an extension of the Roosevelt and Johnson programs through Obamacare and a fairer income taxation system, linked to his endorsement of a more inclusive approach on race, sex and religion.
So that his presidency unites the best of the old welfare state agenda with the modern emphasis on individual freedoms and rights.
Homophobia, in the guise of religious doctrine, is no longer enough to distract voters from the harsher reality of economic inequality promoted by neo-liberal economic agendas.
Surprisingly, then, the remarkable growth in public support for marriage equality over the past decade may have had the unintended consequence of undercutting the Republican effort to wipe away the gains of the twentieth century.
At the least, it looks like Obamacare, the greatest social reform in the US since Johnson, is here to stay.