Some states, including my own, include sexual orientation as a protected class, preventing people from being fired for it, just as they couldn't be fired for being Jewish, black, a Republican, or a veteran. But many states do not:
http://www.friendfactor.org/blog/do...re-your-friends-could-be-fired-for-being-gay/
If you think sexual orientation should be included in anti-discrimination legislation, as you wrongly thought it was, then write to your Congress member, since there is proposed legislation that would protect gays from employment discrimination:
http://www.hrc.org/laws-and-legislation/federal-legislation/employment-non-discrimination-act
As for the claim that marriage is a religious doctrine, that's actually not quite right. It is, among other things, a COLLECTION of differing religious doctrines. For example, in some Jewish doctrines, a marriage cannot exist between a Jew and a gentile. In the Catholic doctrine, a marriage cannot exist with a divorcee. In many faiths, a marriage cannot exist unless sanctified by a specific religious ceremony presided over by an ordained member of their clergy. In some faiths, marriages can't exist between members of different races or social castes. And, of course, in some religions marriages can't exist between people of the same sex (whereas other religions allow such marriages).
In most cases, the government lets the churches defend their own doctrines, but doesn't put any official stamp on them. It keeps church and state separate, rather than taking sides in religious disputes. For example, if a Catholic Church wants to refuse to grant a marriage to someone who was previously married and got divorced, that is entirely their religious right -- but it's not their religious right to insist that the government not do so. If some Protestant wants to get remarried after divorce, the government will recognize that marriage, even if the Pope would insist the first marriage is still in effect and the second one is void.
Yet the government makes a special negative exception for gays.... because SOME churches don't recognize those marriages, the government refuses to let gays get married. That's no more legitimate than if the government outlawed marriages between Jews and gentiles or between Brahmins and Untouchables.