The two men sidestepped deep differences over issues ranging from the environment to the plight of migrants and the poor.
“Honor of a lifetime to meet His Holiness Pope Francis,” a star-struck Mr Trump wrote on Twitter before leaving Rome for Brussels and the next leg of his first overseas trip as US president.
“I leave the Vatican more determined than ever to pursue PEACE in our world,” he added.
In Brussels, a city he once dubbed a “hellhole”, Mr Trump faced thousands of protesters ahead of his first summits on Thursday with leaders of Nato and the European Union.
The US president sparked fears of an end to Nato when he dismissed the world’s biggest military alliance as “obsolete” while on the campaign trail and mortified the EU by backing Brexit.
Mr Trump said that the most important issue during his time in Belgium was terrorism after the “horrible situation” in the English city of Manchester, where a suicide bomber killed 22 people in an attack late on Monday night.
“We are fighting very hard, doing very well under our generals. Making tremendous progress,” he told Belgian prime minister Charles Michel.
“But when you see something like what happened a few days ago you realise how important it is to win this fight. And we will win this fight.”
Mr Trump left Rome declaring his determination for peace following his keenly anticipated encounter with Pope Francis, the 80-year-old former Jesuit priest who has made championing the poor and the third world major themes of his papacy.
In their world view and tastes, the Argentine pontiff who eschews the use of the palaces at his disposal and the billionaire president appear worlds apart.
But despite the pope looking initially grim-faced, both men ended up mostly all smiles, relaxed and even jovial.
Accompanied by his wife, Melania, and daughter Ivanka, Mr Trump met the pontiff in the private library of the Apostolic Palace, the lavish papal residence which the pope decided not to live in, instead opting for more modest lodgings.
“He is something,” Mr Trump later said of his host. “We had a fantastic meeting.”
There was even a light-hearted moment when Pope Francis made an apparent allusion to Mr Trump’s imposing physical size.
“What do you feed him on? Potica?” Pope Francis asked Melania, in a reference to a calorie-laden cake that comes from her native Slovenia and is pronounced “potteezza”.
Mr Trump also told the pope he was committing more than US$300 million (Dh1.1 billion) to help prevent or tackle famine in Yemen and several countries in Africa.
The Vatican described the discussions as “cordial” and emphasised the two men’s joint opposition to abortion and shared concern for persecuted Christians in the Middle East.
The pope presented Mr Trump with a medallion engraved with an olive tree, the international symbol of peace.
He also gave the president copies of the three major texts he has published as pope, including one on the environment which urges the industrialised world to curb carbon emissions or risk catastrophic consequences for the planet.
Mr Trump, who has threatened to ignore the Paris accords on emissions and described global warming as a hoax, vowed to read them.