Yes, voicing his support was a calculated move done to help increase his support among his base, which is not the religious, middle-of-the-road, conservative voters, but his young and left-wing voters. Polls say that he has lost some support among these voters and that his strategists are having him focus on "symbolic" issues to win them over that won't call for him having to actually create any legislation.

From here: https://www.commondreams.org/view/2012/04/18-7

I do think it would be abominable for a president not to voice support for marriage equality or to support but remain silent about it. However, he's not going to do anything about this. It's actually rather safe for him to say he supports this as it's an issue decided on the state level, not one under his jurisdiction anyway.
Originally Posted by diaspora
Got to say I can't believe that's true, but if it is, it means Team Obama is in major danger. He absolutely can't afford to lose anyone in his base. At the same time I'm sorry but Obama can't afford for more than a second of his time to go to keeping young and left-wing voters. If he doesn't already have them he's already screwed. It's all about moving to the middle if he wants to win and gay marriage is waaay more than a symbolic issue for the middle.