Marriage is defined by different religions in different ways: a man and a woman, a man and multiple women, etc.
Marriage is defined by the state to be the civil partnership between two people. Because the state is prohibited from using religious arguments and standards to define marriage, states have traditionally focused on the economic and civil aspects of the partnership. In a sense it is the definition of a partnership with legal effect in domestic law cases.
For those who ascribe purely a religious context to marriage, do they think that divorce should be illegal since it is a rejection of a gift from the almighty? Do they consider people married in secular or other non-Christian ceremonies truly married? Should states adopt policies that only marriages performed in a Catholic church (just to pick a denomination) be considered legal marriages because otherwise there was no Sacrament of Marriage and no Sacrament of the Eucharist performed?
A church has every right to determine who qualifies for marriage according to their religious doctrine and has no obligation to recognize a marriage performed by another entity with regards to church activities. For example Buddhists who were married in a Buddhist ceremony and then converted to Southern Baptist could be required by the Southern Baptist church to remarry in a Baptist ceremony in order to be considered married by the Baptist church. Or the church could recognize the Buddhsit marriage - it's their discretion.
Marriage as recognized by the state is merely affirmation of the desire to enter into a "civil union" witnessed by a duly appointed state or county official. Hence the phrase always heard at weddings, "By the power vested in me by the State of..." The key point is that the power is delegated from the state to the wedding official. As a matter of expedience, priests and other clergy are licensed by the state or county to serve as that official. In many states (at least CA and VA) anyone can apply to be licensed for a limited period of time in order to perform a marriage service.
Because the state is prohibited from using religious tests in determining eligibility for state benefits or entering into a contract, the state cannot deny marriage (in the state's eyes) based on Biblical prohibitions on homosexuality. Also, because everyone - even the icky people - are guaranteed the same rights, in order to forbid gays from entering marriage contracts there has to be a very clear public danger to gays marrying. The CA court found that the arguments presented by those opposed to gay marriage did not meet the standard of being a very clear public danger. All of the traditional non-religious arguments against gay marriage (they'll recruit our kids, they'll bring AIDS to everyone, it'll lead to bestiality) are laughable. Also, in this context, whether or not homosexual behavior is a choice or not is immaterial. Otherwise the state could deny marriage to heterosexual couples who don't agree to refrain from oral or anal sex.
And yes, most likely TX would be required to recognize a legal marriage of two gay guys in CA. Just as they have to recognize a birth certificate or driver's license from CA (even though the CA written driver's tests is laughably easy). They would also have to deal with homosexuals living openly among them - the horror!