But Obama took a stand on same-sex marriage only after being effectively outed by Vice President Joe Biden, whose unexpected show of support for it put pressure on the president to follow suit.
Romney has hardly touched the issue, and neither candidate has been talking about abortion. When news broke recently about a conservative group preparing an independent ad campaign to batter Obama for his past associations with Wright, Romney instantly demanded that it be shelved.
Religion and religious social issues have not always been staples of American political debate.
When Romney's father, George Romney, unsuccessfully sought the Republican nomination in 1968, his Mormon faith was scarcely mentioned — nor was the fact that his primary campaign opponent, Richard Nixon, was a Quaker. Romney would have been the first Mormon president, and Nixon did become the second Quaker (after Herbert Hoover), but voters didn't seem to much care.
That may have been, at least in part, a result of John F. Kennedy's election as the first Catholic president in 1960 and his speech to evangelical ministers promising to maintain a strict wall between church and state.
That speech "was so effective and so persuasive that it ushered in a period in American presidential politics of what I call the Kennedy paradigm of voter indifference to candidates' faith," said Randall Balmer, author of "God in the White House: How Faith Shapes the Presidency from John F. Kennedy to George W. Bush."
That changed with a couple of events. One was the Supreme Court's decision in Roe v. Wade in 1973, affirming a woman's right to an abortion. That put abortion front and center in American politics.
The second was the 1976 election of Jimmy Carter, the first president to identify himself as a born-again Christian. "Carter introduces this language of faith and piety into presidential politics," Balmer said. "Carter changes the equation."
This year, the equation may have changed again, if only because the economy trumps all other issues.
In a recent Washington Post/ABC News poll, 52 percent of those surveyed said the economy was the single most important issue in the presidential race. Nothing else came close. Abortion was considered the most important issue by 1 percent of those surveyed. Same-sex marriage? Also 1 percent.
"It's a big shoulder shrug to voters," Republican consultant Rob Stutzman said of gay marriage. Stutzman, who once worked for Romney, said Obama should be more concerned about a slump in the Dow Jones industrial average.
Obama has acknowledged as much. After declaring his change of heart on marriage, he said: "But I'm not going to be spending most of my time talking about this, because frankly … my biggest priority is to make sure that we're growing the economy, that we're putting people back to work, that we're managing the drawdown in Afghanistan effectively. Those are the things that I'm going to focus on."
Ayres, the Republican pollster, said that in general, "Americans want their presidents to be men … of faith, but they don't want them to wear their faith on their sleeve. … Their basic attitude today is, 'I don't care what your theology is, within limits. … How are you going to fix the economy?'"