WATERLOO, Iowa — Until Monday, when Donald J. Trump proposed a ban on Muslims entering the United States, Hillary Clinton could hardly keep herself from laughing at the mention of his name. “I’m sorry, I can’t help it,” she told ABC News on Sunday, letting out a giggle that made advisers squirm.

She is no longer laughing.

At a town hall here on Wednesday, Mrs. Clinton delivered her most damning, direct criticism of Mr. Trump, saying that he traffics “in prejudice and paranoia,” and that his Muslim proposal was “not only shameful, it’s dangerous.”

But Mrs. Clinton also strove to recognize something stirring in the electorate that Mr. Trump had clearly tapped into. “It’s O.K., it’s O.K. to be afraid,” she said. “When bad things happen, it does cause anxiety and fear,” she added. “But then you pull yourself together and, especially, if you want to be a leader of our country, and you say: ‘O.K., what are we going to do about it? How are we going to be prepared?’”

The remarks bore little resemblance to Mrs. Clinton’s previous dismissals of Mr. Trump. She had portrayed him as a reality television sideshow who voiced more extreme beliefs that, she contended, his more serious Republican rivals shared.