Donald J. Trump dismissed Hillary Clinton with all the anger and contempt of a man who has repeatedly been called out for how he treats women. “Such a nasty woman,” he said.

Mrs. Clinton has pursued a calculated strategy of baiting her opponent to see if he would lash out. She called him a puppet of Vladimir Putin, among other digs. Mr. Trump clearly could no longer contain himself by the end of this debate.

That cutting dismissal, as well as his taunt that her husband didn’t agree with her, played to the heart of the gender dynamics of this election. A man hypersensitive to criticism of any kind was under constant challenge from a confident, assertive woman. Mr. Trump’s advisers, knowing that he had to win over women, particularly the suburban women who have voted Republican in the past, have tried coaching him to keep his cool. His daughter Ivanka tried putting forward a child care plan. But Mrs. Clinton got under his thin skin, and it showed.

In the first debate, he started off with elaborate courtesy. “Secretary Clinton,” he said, calling attention to how he was using the title, even as Mrs. Clinton called him “Donald.” But he couldn’t stop himself from interrupting her, reminding women of how often men have talked over them at work or at home.

When the Clinton campaign deployed Alicia Machado, the former Miss Universe, in a campaign ad talking about how he shamed her for gaining weight, he doubled down, reminding women of how vulnerable they are to the male gaze.

The second debate, surely one of the most surreal on record, was consumed by the fallout over Mr. Trump’s boasts that his fame entitled him to force himself on women. His denials during that debate prompted woman after woman to come forward recounting how he groped them, claims he dismissed as lies.

Mr. Trump paraded women who say they had suffered at the hands of Bill Clinton, at a time when such degradations did not resonate in society as they do now and men were not held accountable. That was a double standard. But that tactic is also a way of blaming a woman for her husband’s infidelity, and it does not seem to have scored many political points among the women Mr. Trump needed to win over.

Mr. Trump went into this debate knowing that the polls show him trailing her in state after key state. The very women he has treated his whole life as objects to leer at or belittle now are exacting their revenge: Many tell pollsters they are not voting for him.

“Nobody has more respect for women than I do,” Mr. Trump insisted after Chris Wallace, the debate’s moderator, challenged him about the accusations of groping.

His own words contradicted his claim.

Susan Chira is a senior correspondent and editor on gender issues for The New York Times.