The US President asked why America should allow more people from "shithole countries" during a meeting with legislators about a proposed bipartisan deal on immigration.
One of the sources who was briefed on the conversation quoted the President as saying: "Why do we want all these people from Africa here? They're shithole countries... We should have more people from Norway."
The sources said Mr Trump also made specific reference to people from Haiti.
When asked about the President's comments at a Geneva news briefing, UN human rights spokesman Rupert Colville said: "These are shocking and shameful comments from the President of the United States.
"There is no other word one can use but 'racist'.
"You cannot dismiss entire countries and continents as 'shitholes', whose entire populations, who are not white, are therefore not welcome.
"The future of the Dreamers should not be used as a bargaining chip to negotiate the most severe and restrictive immigration and security measures possible. These are human beings, not commodities," he added.
The President's comments have drawn widespread condemnation.
A senior official with South Africa's African National Congress party has also criticised Mr Trump.
"Ours is not a shithole country, neither is Haiti or any other country in distress," Jessie Duarte, the deputy secretary general of the ANC said at a news conference in South Africa's Eastern Cape province.
"We would not deign to make comments as derogatory as that about any country that has any kind of socioeconomic or other difficulties," she added.
Former Mexican president Vicente Fox Quesada also tweeted to tell Mr Trump what he thinks of him.
He wrote: "@realDonaldTrump, your mouth is the foulest shithole in the world. With what authority do you proclaim who's welcome in America and who's not. America's greatness is built on diversity, or have you forgotten your immigrant background, Donald?"
The White House did not deny the account of Mr Trump's use of language, but suggested the President was "fighting for permanent solutions" that strengthen the nation, and that included the use of a merit-based immigration system.
"Certain Washington politicians choose to fight for foreign countries, but President Trump will always fight for the American people," White House spokesman Raj Shah said in a statement.
"He will always reject temporary, weak and dangerous stopgap measures that threaten the lives of hardworking Americans, and undercut immigrants who seek a better life in the United States through a legal pathway."
In November, Donald Trump's administration said it was ending Temporary Protected Status for people from Haiti.
It gave the approximately 59,000 Haitian immigrants who had been granted the status until July 2019 to return home or legalise their presence in the United States.