Yes, you can pass laws banning gay marriage or sodomy or whatever else, but that also leaves open the power for people to pass laws sanctioning it. If the voters of California approve of gay marriage, then who are you to trample upon their right to do so?
On personal, family, and religious issues like this, there will likely never be a public consensus. If government didn't insist on getting involved where it doesn't belong (health care, education, etc.) it would be irrelevant. Government policy in areas like this will always be highly controversial and leave a substantial portion of the population angry. I don't see a need for government to set family policy in the first place, so let's do the smart thing and keep the government out.