There are virtually no classes of people that are allowed to be discriminated against based on something that is not their choice. Other than homosexuals, can you think of any obvious examples? It is pretty close to an open and shut case if choice is not involved.
If choice is involved, as in your example of religion, then it is not so simple. We allow a restaurant to bar people who choose not to wear a shirt. We allow the government to levy stiffer taxes on people who choose to smoke cigarettes. We ban people from using drugs. All of these things are choices that are restricted by laws that have not been overturned.
So yes, the constitutionality of gay marriage bans is a much murkier question if homosexuality was merely a behavior. That doesn't make the gay marriage bans proper, and is not an argument to vote for them, it is just a comment on what can and cannot be left to the will of the people based on our constitution and judicial precedent.
* Science does not "prove" things, it only provides a preponderance of evidence in favor of one theory or another. The preponderance of evidence in this case makes it clear that generally speaking homosexuality is a trait, not a choice.