He was granted a short private audience with the head of the Catholic Church on the latest leg of his overseas trip.
The two men have in the past clashed on issues such as migration, climate change and a Mexico-US wall.
Mr Trump is now in Brussels for talks with Nato and EU officials.
He will also hold meetings with Belgium’s King Philippe and Prime Minister Charles Michel.
After the meeting between President Trump and the Pope, the Vatican said there had been an “exchange of views” on international issues.
Mr Trump, who BBC Europe editor Katya Adler says seemed star-struck, said of the Pope: “He is something, he’s really good. We had a fantastic meeting and we had a fantastic tour, it was really beautiful. We’re liking Italy very much… it was an honour to be with the Pope.”
Later Mr Trump tweeted: “Honor of a lifetime to meet His Holiness Pope Francis. I leave the Vatican more determined than ever to pursue PEACE in our world.”
He arrived in Europe from Israel and the Palestinian territories, where he vowed to try to achieve peace in the region.
The US leader began his foreign trip with a two-day stop in Saudi Arabia over the weekend, urging Muslim countries to take the lead in combating radicalisation.
Mr Trump and his entourage arrived at the Vatican just before 08:30, in a meeting that was arranged at the last minute.
The US president was greeted by Archbishop Georg Ganswein, the head of the papal household, and escorted by the Swiss Guard to the offices of Pope Francis.
Correspondents say Mr Trump seemed subdued during their initial meeting, while Pope Francis was not as jovial as he sometimes is with world leaders.
The two men appeared much more relaxed at the end of their 30-minute private meeting.
The Vatican said later that they shared a commitment to “life, and freedom of worship and conscience” and expressed hope that they can collaborate “in service to the people in the fields of healthcare, education and assistance to migrants”.
On international affairs, their “exchange of views” covered the “promotion of peace in the world through political negotiation and interreligious dialogue”, and highlighted the need to protect Christian communities in the Middle East.
After the meeting, they exchanged gifts. Mr Trump gave the Pope a boxed set of writings by the civil rights leader Martin Luther King.
The Pope gave Mr Trump a signed copy of a message he delivered for World Peace Day, along with some of his writings about the need to protect the environment.
He also presented him with a small sculptured olive tree, telling Mr Trump through an interpreter: “It is my desire that you become an olive tree to construct peace”.
Mr Trump responded by saying: “We can use some peace.” He also said he would read the texts the Pope gave him.
Mr Trump also met Italy’s president and prime minister while in Rome.
Seeking common ground – analysis by the BBC’s Jon Sopel, Rome
Ever so slowly and flanked by the Swiss Guard the leader of the world’s pre-eminent superpower walked through the Vatican to meet the leader of one of the world’s pre-eminent religions.
And were there ever two more different people? Pope Francis with just the merest hint of a smile; President Trump beaming. They sat across from each other in the pontiff’s study as though one was going for a job interview.
During the election campaign, when Pope Francis visited the US-Mexico border he said that people who choose to build walls and not bridges weren’t Christian. Donald Trump said those comments were disgraceful.
And in February, just after Donald Trump had tried to introduce his travel ban from six mainly Muslim countries and suspended the refugee programme, the Pope tweeted: “How often in the Bible the Lord asks us to welcome migrants and foreigners, reminding us that we too are foreigners!”
The normal mantra when two world leaders meet is to say “there is more that unites us than divides us”. Almost certainly true. But there are real differences as well.
And the entourage?
Mr Trump was joined not only by his wife, daughter and son-in-law but also Secretary of State Rex Tillerson and National Security Adviser HR McMaster.
Both Melania and Ivanka Trump were dressed in black with their heads partially covered, in keeping with a traditional Vatican protocol that is no longer expected to be rigorously observed.
Melania, a Catholic, asked the Pope to bless her rosary beads.
In a light-hearted exchange, Pope Francis asked her what she gave her husband to eat. It was initially thought he had suggested “pizza” to her, but in fact he said potica, which is a cake from Mrs Trump’s home country of Slovenia. She laughed in response, and agreed with him.
What next for Mr Trump’s trip?
This is Mr Trump’s first visit to Europe since taking office in January.
Security has been stepped up across Rome, with the areas around the Vatican City, the Italian presidential palace and the American ambassador’s residence, where Mr Trump is staying, temporarily closed to traffic.
Despite the heavy police presence, about 100 anti-Trump protesters held a rally in one of Rome’s squares on Tuesday evening.
Significant protests are also expected in Brussels where he will meet EU and Nato officials.
This visit will be about damage limitation with the fervent hope of establishing some kind of transatlantic chemistry, the BBC’s Europe editor Katya Adler says.
She adds that the tone in Brussels has gone from off-the-record sneering when the erratic and unpredictable Mr Trump first won the November elections, to outright concern now that the implications of his presidency have begun to sink in.