There's almost no chance Obama actually changed his mind on the subject of gay marriage. For one, he was is an ivy-league educated professor who held office for Democrats in one of the more liberal districts in the country. He'd be an extreme demographic anomaly to not support gay marriage by 2008.
But how many Ivy-league educated professors were long time members of a Christian Church whose pastor said things like, “Are 44 million Americans with no health care insurance less important than ‘gay marriage’"? (Jeremiah Wright, 2005)
Your argument seems to be that Obama always supported gay marriage, but he pretended not to in his earlier political years. I just don't see why, if an entire nation has obviously evolved on an issue, that it has to be a crazy "coincidence" when people in politics do as well. They don't exist in vacuums; they're part of society as well. This is supported by his memoir six years earlier when he wrote, “I was reminded that it is my obligation not only as an elected official in a pluralistic society, but also as a Christian, to remain open to the possibility that my unwillingness to support gay marriage is misguided.” That sounds like someone evolving back to common sense after letting his mind get tainted by religious dogma.
I could be wrong, but I just remember his interview and he came across to me as genuine and I just remember thinking to myself, he isn't getting anything politically for this. He's just moving Left like the rest of the country has been doing.