“This has to stop,” Senator Susan Collins, a moderate Republican from Maine who is a crucial vote on the legislation, posted in a Twitter message. She added, “We don’t have to get along, but we must show respect and civility.”

Ms. Collins is one of three female swing voters who expressed their distaste for the “Access Hollywood” tape released during the campaign showing Mr. Trump making lewd comments about women with whom he hoped to have an affair.

Christine Matthews, a Republican pollster who specializes in the views of female voters, said the president’s use of Twitter to target a prominent woman was particularly striking, noting that he used only one derogatory word — “psycho” — to describe the show’s co-host, Joe Scarborough, and the remainder of his limited characters to hit upon damaging stereotypes of women.

“He included dumb, crazy, old, unattractive and desperate,” Ms. Matthews said.

“The continued tweeting, the fact that he is so outrageous, so unpresidential, is becoming a huge problem for him,” she added. “And it is particularly unhelpful in terms of building relationships with female Republican members of Congress whose votes he needs for health care, tax reform, and infrastructure.”

Republican leaders have adopted a strategy after such comments of condemning Mr. Trump, then backing him politically. It was unclear whether the vehemence of the latest attack would embolden members of his party to turn disdain into defiance.