To appeal to single women, he picked a fight with the Catholic Church by refusing a conscience exemption from the ObamaCare birth-control mandate. For Hispanics, there was the promise of lax immigration enforcement against illegal aliens who arrived in the U.S. as children. His “evolution” on same-sex marriage seemed designed to appeal not just to gays but also to young voters, whose attitudes on the subject tend to be liberal.

But these calculated overtures carry risks. In appealing to particular demographics, the president may be alienating other Democratic or swing voters. Mr. Obama received 49% of the votes of churchgoing Catholics in 2008. Picking a fight with the church seems a sure way to bring that number down. The immigration move may boost Hispanic support in Colorado and Nevada, but polls suggest it hurts among independents in Ohio and Pennsylvania.

Same-sex marriage is especially unpopular among blacks. This is the most reliably Democratic voting bloc, and no one expects that to change this year. But even a modest drop-off in turnout or support could hurt Mr. Obama. According to exit polls, blacks made up 13% of the 2008 electorate, up from 11% in 2004. That’s a difference of some 3.5 million votes. Mr. Obama’s 95% support does not seem like a dramatic improvement from John Kerry’s 88%, but it amounts to roughly another 1.5 million votes. Add it all up, and the improvement in Democratic performance among blacks between 2004 and 2008 accounted for more than half of Mr. Obama’s nationwide popular-vote margin of 9.5 million.