DOYLESTOWN, Pa. — Donald J. Trump has been waiting for months for a poll in which he cracks 50 percent of the vote against Hillary Clinton in any of his top battleground states: Florida, New Hampshire, Ohio or Pennsylvania.

“It’ll happen after the conventions,” he said in a July 6 interview. “Believe me.”

But in the last two weeks, instead of attracting a surge of new admirers, Mr. Trump has been hemorrhaging support among loyal Republicans, anti-establishment independents, Clinton-loathing Democrats and others, according to polls and 30 interviews with a cross-section of voters. His dispute with the parents of a Muslim Army captain who was killed in action in Iraq, and his suggestion that “Second Amendment people” could somehow stop Mrs. Clinton, have intensified doubts about Mr. Trump even among Americans who were initially attracted to his frank and freewheeling style.

For a candidate who once seemed like an electoral phenomenon, with an unshakable following and a celebrity appeal that crossed party lines, Mr. Trump now faces the possibility that his missteps have erected a ceiling over his support among some demographic groups and in several swing states. He has been stuck under 45 percent of the vote in Ohio and Pennsylvania for weeks, polls show, while Mrs. Clinton has gained support.

Several Republican voters say they grow leery every time Mr. Trump speaks these days, for fear he will embarrass them, and feel increasingly repelled just when they hoped he might adjust his message to try to draw more people in. “I liked that he was politically incorrect. But now I feel, enough already,” Trish Grove, a banker, said as she finished lunch at a diner here in Doylestown, a bellwether suburb north of Philadelphia. “He’s not going to win a majority of voters by sounding offensive and ridiculous.”