"The differentiation demeans the couple, whose moral and sexual choices the Constitution protects and whose relationship the state has sought to dignify,"he wrote. "And it humiliates tens of thousands of children now being raised by same-sex couples."

Last year, he explained in vivid terms why the marriage law drew an unconstitutional distinction by barring benefits for married same-sex couples.

But Justice Kennedy, 78, has long had gay friends, and his legal philosophy is characterized by an expansive commitment to individual liberty. He wrote the majority opinions in all three of the court's gay rights landmarks, which struck down a Colorado constitutional amendment that banned laws protecting gay men and lesbians, a Texas law that made gay sex a crime, and the heart of the federal Defense of Marriage Act.

A Sacramento lawyer and lobbyist who still lived in the house he grew up in when President Ronald Reagan nominated him to the Supreme Court in 1987, Justice Kennedy is the product of a placid middle-class existence in which most women stayed within traditional roles. Some of his judicial writing, Justice Ginsburg once wrote in dissent, reflected "ancient notions about women's place in the family."

Many forces are contributing to this divide, but the most powerful is the role of Justice Anthony M. Kennedy, the court's swing vote. Legal scholars say his jurisprudence is marked by both libertarian and paternalistic impulses, ones that have bolstered gay rights and dealt setbacks to women's groups.

At the same time, legal scholars say, the court has delivered blows to women's groups in cases involving equal pay, medical leaves, abortion and contraception, culminating in a furious dissent last month from the court's three female members.

Gay men and lesbians still have a long way to go before they achieve the formal legal equality that women have long enjoyed. But they have made stunning progress at the Supreme Court over the last decade, gaining legal protection for sexual intimacy and unconventional families with stirring language unimaginable a generation ago.

Justice Ginsburg is not the only one who has sensed that cases involving gay people and women are on different trajectories.

But in cases involving gender, she said, the court has never fully embraced "the ability of women to decide for themselves what their destiny will be." She said the court's five-justice conservative majority, all men, did not understand the challenges women face in achieving authentic equality.

In its gay rights rulings, she told a law school audience last week, the court uses the soaring language of "equal dignity" and has endorsed the fundamental values of "liberty and equality." Indeed, a court that just three decades ago allowed criminal prosecutions for gay sex now speaks with sympathy for gay families and seems on the cusp of embracing a constitutional right to same-sex marriage.

Justice Kennedy writes in a different register in cases about women's sexual freedom and motherhood, said David S. Cohen, a law professor at Drexel University.

In those cases, Justice Kennedy tends to vote with the court's four more conservative members — Chief Justice John G. Roberts Jr. and Justices Antonin Scalia, Clarence Thomas and Samuel A. Alito Jr. — and to read statutes narrowly in favor of employers and religious freedom. In an article in The South Carolina Law Review surveying "Justice Kennedy's gendered world," Professor Cohen concluded that "Justice Kennedy relies on traditional and paternalistic gender stereotypes about nontraditional fathers, idealized mothers and second-guessing women's decisions."

Perhaps the most memorable — and to women's groups, the most troubling — passage of this sort came in Justice Kennedy's 2007 majority opinion in a 5-to-4 vote sustaining the federal Partial-Birth Abortion Act.

Read MoreWork-life debate:Can women have it all?

"Respect for human life finds an ultimate expression in the bond of love the mother has for her child," he wrote. "While we find no reliable data to measure the phenomenon, it seems unexceptionable to conclude some women come to regret their choice to abort the infant life they once created and sustained."

If Justice Kennedy best embodies the court's conflicting impulses toward gays and women, Justice Ginsburg is in many ways his opposite. She voted with him in all of the major gay rights cases, but in women's rights cases she has issued a series of sharp dissents.

Justice Ginsburg, 81, was a prominent women's rights litigator before she became a judge, overcoming obstacles related to her gender along the way. After attending Harvard Law School as one of nine women in a class of more than 500 and graduating from Columbia Law School, she was turned down by law firms and was refused judicial clerkships because she was a woman. When she became a professor at Rutgers School of Law, she was told she would be paid less than her male colleagues because her husband, also a lawyer, had a good job. She later became the first tenured female professor at Columbia Law School.

More from the New York Times:

James S. Brady, Symbol of Fight for Gun Control, Dies at 73

Cease-Fire Agreed To in Gaza as Israel Slows Assaults

IraqAgrees to Help Kurds Battle Sunni Extremists

Speaking last week at a reception for students and alumni of Duke University School of Law, she said the Supreme Court had made a grave error in June in its Hobby Lobby decision, which allowed some employers to refuse to pay for insurance coverage for contraception based on religious objections. "There was no way to read that decision narrowly," she said, adding that it opened the door to job discrimination against women.

"What of the employer whose religious faith teaches that it's sinful to employ a single woman without her father's consent or a married woman without her husband's consent?" she asked. The court, she said, "had ventured into a minefield."

She summarized her dissent in the Hobby Lobby case from the bench, a rare move signaling vehement disagreement, one that happens perhaps four times a term. When Justice Ginsburg issues an oral dissent, it is very often in a case concerning women's rights.

Read MoreObamacare subsidy fight could go to Supreme Court

In 2007, Justice Ginsburg, the only woman on the court at the time, dissented from the bench in the abortion case, calling Justice Kennedy's worldview alarming. A month later, she issued a second oral dissent in another 5-to-4 decision, Ledbetter v. Goodyear Tire and Rubber Co., this one protesting what she called the majority's cramped interpretation of time limits for filing sex discrimination suits. Prompted by the dissent, Congress later overturned the ruling.



She dissented again from the bench in 2012 in Coleman v. Court of Appeals of Maryland, a 5-to-4 decision limiting the availability of medical leaves. In his controlling opinion, Justice Kennedy said he saw no "widespread evidence of sex discrimination or sex stereotyping in the administration of sick leave," while Justice Ginsburg said from the bench that the decision made it harder for women "to live balanced lives, at home and in gainful employment."

The recent cases concerning women are not directly comparable to those involving gay rights, which considered questions as fundamental as whether states can make gay sex a crime. And gay rights groups say there is much work to be done before gay men and lesbians achieve the legal protections women have long enjoyed.

Read MoreSplit decision! Fed appeals courts disagree on Obamacare subsidies

In much of the country, for instance, employers and landlords are free to discriminate based on sexual orientation. The Supreme Court has never recognized heightened constitutional scrutiny for discrimination based on sexual orientation, though it has long done so for ones based on gender.

For now, said Suzanne B. Goldberg, a law professor at Columbia, "the court's recent gay rights decisions seem to be catching up with women's rights cases of earlier decades."

"At the same time," she added, "we live in a society that now seems more receptive to gay rights than women's rights generally, so it is disheartening but not surprising to see that reflected in decisions like Hobby Lobby, which failed to see the link between contraception access and women's equality."

Justice Ginsburg has suggested that her male colleagues sometimes do not hear a woman's voice, including her own. In a 2009 interview with USA Today, she said the other justices, who were then all men, sometimes ignored the arguments she made at their private conferences.

Read MoreObamacare's big threat hits new legal level



"I will say something — and I don't think I'm a confused speaker — and it isn't until somebody else says it that everyone will focus on the point," Justice Ginsburg said.



Between 2006 and 2009, after the resignation of Justice Sandra Day O'Connor and before the appointment of Justice Sonia Sotomayor, Justice Ginsburg was the lone woman on the court, a situation she said she found isolating and disturbing. Now, with the addition of Justice Elena Kagan in 2010, there are three women, and they often vote together.

They did so last month in dissenting from an order allowing Wheaton College, a Christian institution in Illinois, to forgo using a federal form to claim an exemption from a contraception coverage requirement under the Affordable Care Act. Justice Sotomayor wrote the dissent, which accused the majority of failing to protect "women's well-being."

Nan Hunter, a law professor at Georgetown University, said the dissent was noteworthy. "For many American women," she said, "it was no surprise that it was those three justices who felt strongly enough to cry foul."