Given the behavior of some of its current presidential candidates, you’d be forgiven for assuming that the Republican Party is a haven for backward-thinking homophobes.

Rick Santorum has compared gay marriage to the terrorist attacks of September 11, and compared gay couples to those who engage in bestiality. Mike Huckabee has all but mounted a holy war against the Supreme Court for ruling in June that the freedom to marry extended to all Americans, and Scott Walker is suddenly calling for a federal constitutional amendment that allows states to ban same-sex marriage.

And yet, not too far below the pandering, headline-grabbing surface, an army of young conservatives is working to shake off the G.O.P.’s anti-gay image, recast the party as more inclusive, and retire same-sex marriage as a political issue once and for all.

“This is an issue of mass and manners,” says S.E. Cupp, a self-described Log Cabin Republican who became a viral sensation when she grew emotional in a CNN interview following the Supreme Court’s ruling on marriage. (“Those people . . . are patriots,” a teary-eyed Cupp said of gay-marriage advocates.) “On the mass side, the country just doesn’t agree with you anymore and I don’t think that’s going to [change]. So, just from the math you have to understand: you’re an outlier.

“And then on the manners, you have to understand that people like me, people who are supportive of gay rights and conservative or [who are] gay themselves, they’re fighting doubly hard to advance conservative values,” she says. “We shouldn’t be kicked out of the party, or castigated, or called anti-conservative because we hold these views.”

The polling supports the Republicans driving the change. The Pew Research Center found in February that 58 percent of millennial Republicans (born after 1980) support the freedom to marry. (Seventy-three percent of millennials—regardless of party affiliation—favor gay marriage.) More than a quarter of young voters polled by the College Republican National Committee said that opposing the freedom to marry is a deal breaker in their consideration of a candidate.

“It’s not a thing where [these Republicans] recently decided, ‘Oh, yeah, I guess it’s O.K. now,’” says Jerri Ann Henry, campaign manager for the Young Conservatives for the Freedom to Marry, who is fighting to amend the Republican Party’s official platform on the issue. “It’s literally fundamental for them. It’s human rights.”

There are two outcomes Republican advocates for the freedom to marry are working toward. The shorter-term goal, as Cupp describes it, is to “not burn ourselves as Republicans by putting people off indefinitely.” Young Republicans are trying to encourage their party elders to “talk about gay marriage in better ways,” Cupp says, until the “hearts and minds” part—the second phase of the transformation—comes to fruition. “It’s not going to be through Supreme Court rulings that you change hearts and minds,” she says. “It’s going to be meeting other people and hearing their stories, like [Senator] Rob Portman did.” Portman changed his view on marriage in 2013, two years after his son came out as gay.

Polling aside, another potential reason Republicans are softening their rhetoric is the continued contribution of openly gay individuals to the party and its campaigns. Jeb Bush’s communication director, Tim Miller, is openly gay. Ken Mehlman, the former chair of the Republican National Committee, came out in 2010. Studies have found that knowing one gay person can more than double the likelihood that someone is pro-marriage equality. There are, of course, an untold number of gay conservatives working as campaign aides and government staffers—many for candidates and politicians who don’t believe same-sex marriage should be legal. (Miller declined to be interviewed for this piece.)