In 2008 Obama said he believed marriage should be between a man and a woman and that he "just wasn't there yet". A person who genuinely believes one position will not say they "just aren't there yet" that implies that the person's currently expressed belief is wrong. A person can not believe something and also believe that same belief is wrong. It's clear that Obama really did support gay marriage at that point and was just pretending to be against it to get votes.
Obama is a major blowhard who only says things that people want to hear he is a coniving little turd who does not want to do anything for our country to get us out of the debt and wants to get rid of things to help us out in life
Obama's has not been a presidency of secrecy, in fact, he has alienated many people on the left because he disagreed with them, so to say that he secretly supported gay marriage or anything else is ridiculous. He has always been forthcoming about what he supports, including gay marriage, and his presidency is not characterized by anything secret.
As much as I like Obama, I must concede that he tends to be moderately conservative on some issues. I think he feared losing the 2012 election by saying the wrong thing, and so took a moderate stance, hoping not to offend anyone. But I also think that as a devout Christian, he probably was opposed for religious reasons. However, as a liberal and someone who routinely meets with constituents about issues, I think his mind was probably changed about this issue as he widened his mindset and became more tolerant.