Politifact recaps Obama's many positions on gay marriage and gave him a Full Flop.
When filling out a questionnaire in 1996 questionnaire, Obama said, "I favor legalizing same-sex marriages, and would fight efforts to prohibit such marriages."
In 1998 he was undecided.
In 2004 he said, "I am a fierce supporter of domestic-partnership and civil-union laws. I am not a supporter of gay marriage as it has been thrown about, primarily just as a strategic issue. I think that marriage, in the minds of a lot of voters, has a religious connotation. ..." He reaffirmed this in 2007.
In 2008 he said, "I believe that marriage is the union between a man and a woman. Now, for me as a Christian, it is also a sacred union. God's in the mix." and "I believe marriage is between a man and a woman. I am not in favor of gay marriage."
In 2010 he said that his views were "evolving". Many gay activists took this as code words for "I'm for gay marriage but I am not ready to say so in public."
After Biden said on May 6 of this year that he was in favor of gay marriage, the White House issued a statement saying that the President's position had not changed and that Biden was talking out of turn. Gay activists began pressuring Obama to announce that he was in favor of gay marriage.
On May 8, North Carolina became the latest state to pass an anti-gay marriage/civil union constitutional amendment. Obama did not insert himself into the issue.
On May 9, Obama announced that he had changed positions and now favored gay marriage. A few days later he took in record amounts at a Hollywood fundraiser.
So, on May 7 when it might have made a difference to voters in North Carolina, Obama was against gay marriage but on May 9 with a fundraiser approaching, he changed his position while making it clear that he would not support any legislation.
So the only person who got any real benefit from the announcement was Obama, himself.
Just so you know where things stand.