They were a "grave threat to our national security", he added, and he would get to the bottom of it.
His remarks come after US media published photos from the scene of Monday night's explosion.
Salman Abedi blew himself up after a Ariana Grande concert, killing 22 adults and children and injuring 116.
Mr Trump, who is at a Nato summit in Brussels along with UK Prime Minister Theresa May, said: "These leaks have been going on for a long time."
He pledged to ask the US Department of Justice to launch a review, and "if appropriate, the culprit should be prosecuted".
"There is no relationship we cherish more than the special relationship between the US and the UK," he added.
In a speech at the summit, Mr Trump said the attack in Manchester demonstrated the "depths of the evil we face with terrorism".
"Innocent little girls and so many others were horribly murdered and badly injured whilst attending a concert," he said.
"Beautiful lives with so much great potential, torn from their families for ever and ever. It was a barbaric and vicious attack upon our civilisation.
"All people who cherish life must unite in finding, exposing and removing these killers and extremists, and yes, losers, they are losers.
"Wherever they exist in our societies we must drive them out and never, ever let them back in."
Earlier, the top US diplomat in the UK, Lewis Lukens, condemned the leaks as "reprehensible" and told the BBC action would be taken to identify those responsible.
It comes as police described the eight arrests made since the bombing as "significant", and items seized in raids as "very important".
Abedi detonated his "nuts-and-bolts" bomb at the end of the gig as children, teenagers and others were making their way out of the auditorium.
Others, including parents, were waiting in the foyer to pick up family and friends.
Why are the UK authorities so angry?
On Wednesday, the New York Times outraged British police and government officials when it published photos appearing to show debris from the attack.
They included bloodstained fragments from the bomb and the backpack used to conceal it.
Greater Manchester Police were said to be "furious" and said they would stop sharing information with the US.
Its chief constable Ian Hopkins said the leak undermined the investigation and had distressed families "already suffering terribly with their loss".
The New York Times newspaper has defended its decision to publish the pictures, saying they were "neither graphic nor disrespectful of victims".
Prime Minister Theresa May has said she will make clear to US President Donald Trump that shared intelligence must remain secure when she meets him at the NATO summit.
UK officials believe that US law enforcement rather than the White House is the likely culprit for the leaks, BBC security correspondent Gordon Corera says.