Nate Silver at FiveThirtyEight posted this graph that shows changes in attitudes toward same-sex marriage over time (each dot represents a poll Silver considers reliable). As he points out, there seems to be an acceleration in positive attitudes toward same-sex marriage:

CNN just conducted the first poll showing that a majority of Americans believe same-sex marriage should be legal. That’s just one poll, and we’ll need to see more data, obviously. But we can clearly see that an increasing number of polls show the % favoring same-sex marriage at or above 45%. A regression of all the polls shows a 4 percentage point increase in the last 16 months alone. If this trend continues, we should be nearing the point where differences in support for and opposition to same-sex marriage would fall within the margin of error.

Silver suggests that activism among gay and lesbian rights groups, including a specific push for recognition of same-sex marriages, has led to more acceptance:

Something to bear in mind is that it’s only been fairly recently that gay rights groups — and other liberals and libertarians — shifted toward a strategy of explicitly calling for full equity in marriage rights, rather than finding civil unions to be an acceptable compromise…it seems that, in general, “having the debate” is helpful to the gay marriage cause…

Of course, presuming this trend continues and we soon have a majority (even if not an overwhelming one) of Americans supporting legalization of same-sex marriage, that does not necessarily translate into legalization. Acceptance of same-sex marriage is surely unevenly distributed across the U.S. If legalization is left to the states, we can assume some will be much more likely to accept same-sex marriages than others, continuing the patchwork system we have now where gays and lesbians may find themselves married in one state but unmarried if they go on vacation to a neighboring one. National legislation to legalize same-sex marriage would be strongly opposed by a number of legislators from districts where acceptance is below the national average; I’m guessing that even many Democrats, who are usually depicted as more friendly to gay and lesbian rights than Republicans, would not go so far as to vote to legalize gay marriage in the near future. During the campaign, Obama and Biden clearly stated that they supported civil unions but not marriage for same-sex couples.

On the other hand, the federal judicial system could take this out of the hands of Congress and the Senate, or individual states; same-sex marriage could be legalized whether or not a majority of Americans supported it. But short of that, while changes in public attitudes toward same-sex marriage certainly present an encouraging picture for supporters, I think legislative action to actually legalize it is likely to lag significantly behind overall public acceptance.