WASHINGTON — President Obama’s carefully crafted position on the issue of gay marriage is leaving him trapped between liberal elements important to his party and the socially conservative swing voters who could well decide the November election.

But other Democrats with future White House ambitions are in a much different place. With same-sex marriage rapidly gaining support among Democratic voters and donors, they risk damaging their presidential prospects by remaining behind the curve on the issue.

As a result, a growing number of prominent Democratic leaders are leaving the president behind on gay marriage, which he opposes.

Vice President Joe Biden set off renewed discussion of the issue when he announced on a Sunday talk show that he was “absolutely comfortable” with same-sex marriage. The sentiment was echoed by Education Secretary Arne Duncan on Monday.

Gay rights groups hailed the statements, with the Human Rights Campaign splashing a large color photo of a grinning Biden and Duncan across its website.

Obama’s top reelection strategist, David Axelrod, insisted that Biden’s comments were “entirely consistent with the president’s position, which is that couples who are married, whether they are gay or heterosexual couples, are entitled to the very same rights and very same liberties.”

Axelrod told reporters on a conference call that “there couldn’t be a starker contrast on this issue than with Gov. [Mitt] Romney, who has funded efforts to roll back marriage laws in California and other places, who believes that we need a constitutional amendment banning the rights of gay couples to marry, and would take us backward, not forward.”

White House Press Secretary Jay Carney, asked whether the president, like Biden, was comfortable with gays marrying, said Obama was comfortable with same-sex couples “being entitled to the same rights and the civil rights and civil liberties as other Americans.” He said he would leave the question of whether marriage is a civil liberty to “civil libertarians or lawyers.”

Biden, who returned to campaigning Monday at private fundraisers in Nashville and Atlanta, said nothing in public. The vice president, 69, has not ruled out a 2016 run.

Younger Democrats with higher aspirations have already sided with the gay rights movement. Govs. Andrew Cuomo of New York and Martin O’Malley of Maryland signed same-sex marriage measures into law in the last year.

Secretary of State Hillary Rodham Clinton, widely viewed as a 2016 contender despite her demurrals, has not endorsed same-sex marriage. But her husband, former President Clinton, is delivering an automated phone message urging voters in North Carolina to reject an anti-gay-marriage measure on Tuesday’s ballot.

Obama aides, mindful of how his presidency will be evaluated by history, regularly rebut questions about marriage with a checklist of ways the president has advanced gay rights. Among them: the elimination of the “don’t ask, don’t tell” policy barring gay service members from serving openly in the military, the Justice Department’s refusal to defend the Defense of Marriage Act in court and smaller measures aimed at strengthening legal rights for same-sex couples.

Obama has been aggressively soliciting campaign funds from gay donors, in part to compensate for a falloff in giving from Wall Street. At the same time, he has continued to resist pressure to endorse same-sex marriage. In 2010, he said the “arc of history” was trending in favor of gay marriage and that his own views were “evolving.”

Polls show overwhelming support among Democratic voters, but independent voters remain split, and the issue finds resistance among older voters in particular.

The gay marriage comment wasn’t the first time that Biden had put his boss on the spot with an apparently unscripted remark. But his words appeared to reflect the vice president’s instinctive feel for the issue, not least because of the large number of gay people he’s encountered at fundraising events across the country.

According to an attendee, Biden gave a similar answer at a private dinner for about 30 gay rights leaders and others last month at the Los Angeles home of Michael Lombardo, an HBO executive, and his husband, Sonny Ward. The vice president referred to the event during an interview Sunday on NBC’s “Meet the Press.”

“One gentleman looked at me in the question period and said, ‘Let me ask you, how do you feel about us?’ And I had just walked into the back door of this gay couple and they’re with their two adopted children. And I turned to [Lombardo]. I said, ‘What did I do when I walked in?’ He said, ‘You walked right to my children. They were 7 and 5, giving you flowers.’ And I said, ‘I wish every American could see the look of love those kids had in their eyes for you guys. And they wouldn’t have any doubt about what this is about.’ ”

Dinner guest Chad Griffin, incoming president of the Human Rights Campaign and a gay rights activist in Los Angeles, said that at one point Biden mentioned that he had to be careful when he articulated a position that was different from the president’s.

Griffin said that politicians a few years ago were running from the issue of same-sex marriage. “Now, they’re running to the issue.” He added that “increasingly, people in public life are being asked their position on this real-life issue ... and they’re choosing to answer it honestly.”

michael.memoli@latimes.com

david.lauter@latimes.com

Paul West and Kathleen Hennessey in the Washington bureau contributed to this report.