This is a really simple concept but so many people don't understand it that it leads to a lot of confusion. Needless to say conservatives don't understand the difference between sex and gender but I find that even some good progressives are unclear on the distinction, so let me just try to break it down for a minute:
Sex is biological. In humans, each cell normally contains 23 pairs of chromosomes, for a total of 46. Twenty-two of these pairs, called autosomes, look the same in both males and females. The 23rd pair, the sex chromosomes, differ between males and females. Females have two copies of the X chromosome, while males have one X and one Y chromosome. (More here.)
Making matters more confusing, occasionally some people are born with two X chromosomes and at least one Y chromosome (more info here) or one X chromosome and two Y chromosomes (more info here). So even biologically determined sex, male and female, is not black and white, either/or.
Gender is socially constructed. Masculinity and femininity are socially constructed and socially defined. Both male (XY) and female (XX) can express masculinity or femininity as they so choose.
You can have an opposite sex marriage (a man and a woman -- as Carrie Prejean would prefer things apparently) that is still also a same gender marriage (both male or both female in how they choose to express themselves socially). So too you can have a same-sex marriage (two men or two women) that is still also an opposite gender marriage (one same sex partner expresses the traditionally opposite gender).
Because gender is socially constructed -- no one person is ever entirely one or the other, masculine or feminine. We are all a blend of both masculinity and femininity and that blend can change as we so choose. Indeed it is increasingly clear that a balance of masculinity and femininity is essential to the health of any organism.
As I understand it, the California Supreme Court is NOT deciding same-gender marriage. They are ruling on same-sex marriage (whether two people who both have XX or who both have XY chromosomes can marry each other). Same-gender marriage (because gender is socially constructed) is already legal in all 50 states.
The problem: and the understandable source of much confusion is that the words male and female can refer to either sex or gender. The words were developed during an ancient time in which people (wrongly it turns out) assumed that biologically determined sex and socially determined gender, were the same thing. Now we know that they are not. But the words male and female persist -- and are used interchangeably in conversation sometimes to connote sex and other times to connote gender usually without the speaker ever specifying which meaning is intended.
That's the reason that conservatives always get it wrong on same sex marriage. They incorrectly think that gender is biologically determined -- so any male (XY) who expresses (social) female traits is viewed as acting "against nature" -- against their "biological programming." Conservative love so called "natural law" -- unfortunately, they don't actually understand nature very well and so they usually get both nature and human nature wrong.
Update #1. Tuesday, May 26, 2009 is Stonewall Tuesday here in California as the State Supreme Court hands down their decision regarding Prop 8. I just want to remind everyone that no matter what they decide this thing is going to end up going before the voters again. If the State Supreme Court does the right thing and strikes down Prop 8 -- we're gonna have to put together a campaign to protect our justices from a recall effort. And if they do the wrong thing and uphold the heinous Prop 8 -- then we're gonna have to go to the ballot box to try to overturn their decision. So yeah, let's get ready to burn the mutherfucker down and make this place ungovernable if they uphold Prop 8 on Tuesday. But remember that we're still gonna have to win it at the ballot box sooner or later (probably in November 2010).