The symbolic resolution denounced Mr Trump's "racist comments that have legitimised fear and hatred of New Americans and people of colour".
Mr Trump had been accused of racism and xenophobia for telling the members of congress to leave the country.
The president has since tweeted: "I don't have a Racist bone in my body!"
The vote was passed by 240 votes to 187.
Passing a resolution - which is a statement of opinion and not legally binding - criticising presidential conduct is very rare.
In a series of tweets on Sunday, the president said Representatives Alexandria Ocasio-Cortez, Ilhan Omar, Ayanna Pressley and Rashida Tlaib "originally came from countries whose governments are a complete and total catastrophe" and should "go back".
Mr Trump did not explicitly name the women - all four of whom are US citizens - in his initial Twitter tirade, but the context made a clear link to the four Democratic congresswomen.
"I'm dealing with the biggest bully I've ever had to deal with," said congresswoman Rashida Tlaib.
Democrat John Lewis said that "at the highest level of government, there's no room for racism.”
Immediately after the resolution passed, Democratic Representative Al Green of Texas filed articles of impeachment against President Trump. The Democratic leadership has refused to pursue impeachment, despite increasing calls from members of their party to do so.
Mr Green said Mr Trump had "brought the high office of the President of the United States into contempt, ridicule, disgrace and disrepute".
There have been only four congressional votes to approve resolutions aimed at censuring or condemning a president, according to a 2018 report by the Congressional Research Service.
The last occasion was against William Howard Taft in 1912, when he was accused of trying to influence a disputed Senate election.
Darul Ihsan Media Desk