Before Mr. Obama spoke out, leading Republican figures like Newt Gingrich, a former speaker of the House, and Sarah Palin, the party’s 2008 vice-presidential nominee, had been voicing opposition to the Islamic center.