Tom Piskula is 48. He remembers believing as a young man that if he acknowledged he was a homosexual he would have to accept that he was giving up the right to have children. "It was either be gay or have kids," says Piskula, who now shares a home in New Jersey with Jeffrey Lu, 36, and their 20-month-old girls, Ivory and Iris, who were born using Lu's sperm and a surrogate mother. You can trace the roots of the gay baby boom back to the mid-nineties, when a number of cultural forces came together. The gay-rights struggle had given gay men greater freedom and acceptance, and the aids epidemic had made monogamy more appealing. This translated into the same-sex-marriage movement, which led to the growing prevalence of domestic partnerships, civil unions, and gay marriage.

The next logical step was fatherhood. Or maybe it was the other way around. "The legal changes helped people feel comfortable about changing their behavior," says the Yale law professor William N. Eskridge Jr., the author of Dishonorable Passions: Sodomy Laws in America, 1861-2003. "Those behavioral changes have helped change the law."

Not that any of this means it's become easy for gay men to form families. Many states allow some kind of legalized relationship for gays, but only one, Massachusetts, has gay marriage on the books. And there are legal barriers in many states that prevent two unmarried people from adopting the same child. Then there is the time, energy, and sheer cost.

Marsh Hanson and Jay Wilson were lucky to find their surrogate friend and to be able to inseminate her privately in their home. "Part of the issue for us was financial," Hanson says. "It was the cheapest way to do this." They are in the minority. Most gay men opt for an IVF procedure using an egg from a donor placed in the body of a different woman, who carries the embryo to term. This is called gestational surrogacy and is favored because in some states it gives the carrier no legal rights to the child she gives birth to.

Melissa Brisman, a New Jersey lawyer who specializes in reproductive law, says it can cost between $60,000 and $150,000 to create a baby through IVF. The parents pay the gestational carrier's medical bills. The fee paid to the carrier is often around $20,000; for carrying twins it can be $3,000 to $5,000 higher. The egg donor typically gets around $8,000 (although it can be less).

It's been a few months since Hanson and Wilson handed the syringe to their surrogate, and sure enough, Piper is pregnant, although no one knows the sex of the baby or whose sperm did the trick. "At the end of the day we'll be happy whoever the dad is," Hanson says. "But both of us are secretly wanting to have hit the ball out of the park."