As the Supreme Court considers overturning California’s ban on same-sex marriage, gay people await a ruling that could change their lives. But the case has already transformed one gay man: Ken Mehlman, the once-closeted Republican operative who orchestrated President George W. Bush’s 2004 re-election on a platform that included opposition to same-sex marriage.

Now Mr. Mehlman, a private equity executive in Manhattan, is waging what could be his final campaign: to convince fellow Republicans that gay marriage is consistent with conservative values and good for their party. His about-face, sparked in part by the lawyer who filed the California lawsuit, has sent him on a personal journey to erase what one new friend in the gay rights movement calls his “incredibly destructive” Bush legacy.

He remains controversial, both applauded and vilified. On the left, he is either an unlikely hero or a hypocritical coward. On the right, some Republicans embrace him; others deem him a traitor.