Updated

Gay marriage legalization in several states and the public's growing acceptance of same-sex unions have Democrats sensing political opportunity and some Republicans re-evaluating their party's hard-line opposition to an issue that long has rallied its base.

In recent weeks, Vermont and Iowa have legalized same-sex marriage, while New York, Maine and New Hampshire have taken steps in that direction. Polls show younger Americans are far are more tolerant on the issue than are older generations. For now at least, the public is much more focused on the troubled economy and two wars than on social issues.

In addition, over the past decade, public acceptance of gay marriage has changed dramatically.

A Quinnipiac University poll released last week found that a majority of people questioned, by a 55-38 percent margin, oppose gay marriage. But it also found that people, by a 57-38 percent margin, support civil unions that would provide marriage-like rights for same-sex couples, indicating a shift toward more acceptance.

With congressional elections next year, Republicans, Democrats and nonpartisan analysts say the changes benefit Democrats, whose bedrock liberals favor gay unions, and disadvantage Republicans, whose conservative base insists that marriage be solely between a man and a woman.

"This is not a sea change. This is a tide that is slowly rising in favor of gay marriage," creating a favorable political situation for Democrats and ever-more difficulty for Republicans, said David McCuan, a political scientist at Sonoma State University in California.

Democrats have a broader base filled with more accepting younger voters, as well as flexibility on the issue. Hard-core liberals support gay marriage, while others, including President Barack Obama, take a more moderate position of civil unions and defer to states on gay marriage.

Conversely, the GOP base is older, smaller and more conservative. Republicans have no place to shift on the issue but to the left, because the party has been identified largely with its rock-solid opposition to gay marriage and civil unions. Also, the GOP has no titular head setting the tone on this or other issues.

In recent months, proponents have used state legislatures and court challenges to legalize gay marriage, mindful that the majority of the public still isn't supportive and successful ballot measures would be less likely.

Because of high court rulings, gay marriage now is legal in Iowa, Massachusetts and Connecticut. A Vermont law allowing gay marriage will take effect in September. New Hampshire and New Jersey, where same-sex couples can enter into civil unions, are considering gay marriage legislation. So are Maine and New York.

Political insiders no doubt will pay close attention to developments in Iowa and New Hampshire, early presidential voting states, to see how the issue plays out in the run-up to the 2012 presidential election.

Despite the changes, gay-marriage opponents are buoyed by a voter initiative in California that blocked the state from allowing gay marriage, and by the 29 states where voters have approved state constitutional amendments banning gay marriage.

For years, the GOP and its conservative base has used its opposition to gay marriage to drive Republican turnout in elections and marginalize party moderates. Measures defining marriage between a man and a woman that were on ballots in a slew of states in 2004 were widely credited with boosting the number of conservative voters, giving Republican George W. Bush an edge over Democrat John Kerry.

But there's been conflicting evidence since then over just how much that contributed to Bush's victory.

What's certain is that opposition to gay marriage for decades has been a potent tool for the GOP in rallying social conservatives. They are critical to the party's grass-roots organizing and small-dollar fundraising.

But as more states accept gay and lesbian unions, there is a debate inside the party over how it should position itself on the issue. The dispute is just one part of a broader struggle within the out-of-power GOP over its identity and whether it should focus on rallying conservatives or attracting supporters from across the political spectrum.

Some prominent Republicans are backing away from cut-and-dried opposition, and some party operatives say it's only a matter of time before others follow suit because the country is changing.

Republican Gov. Jon Huntsman of Utah, a Mormon who is a potential presidential candidate, backed a 2004 constitutional amendment defining marriage as between a man and a woman. But he says he favors civil unions and extending some legal rights to gay couples.

Last month, John McCain's chief campaign strategist, Steve Schmidt, told the Log Cabin Republicans: "Even though a majority of Republicans remain opposed to it, we must respect dissent on the subject within the party and encourage debate over it, and should not reject out of hand and on specious grounds ... that the party might be in the wrong on the question."

The shifting landscape is emboldening the gay-rights' movement, a pillar of the Democratic Party's left flank.

"We are at a tipping point moment," said Joe Solmonese, president of the Human Rights Campaign, a leading advocate of gay rights. "The lingering minority that continues to think that the way to win is to hold GLBT (gay, lesbian, bisexual and transgender) people up as a wedge could not be more out of touch."