Federal law trumps state law. Many southern states still have jim crow laws that are not enforced, and are not enforceable. Texas still has a sodomy law that they cannot enforce because of the federal supreme court. True, Obama just saying this does nothing, but as soon as the supreme court finds that the state laws against gay marriage are unconstitutional, it will not matter a bit that they have laws or constitutional amendments prohibiting it, just like they cannot enforce a law making inter-racial marriage illegal.
As conservative as the Supreme court is they may actually find gay marriage bans unconstitutional. If not, it'll be a while. Even if the liberals have the votes, John Roberts is the one who decides what cases to hear, so unless he wants to hear a case that he knows will turn out against his views, he will not allow it to be heard. He is young enough that this could drag on for decades.