The president smiled broadly beside the pontiff, who appeared subdued and stone-faced before their 30-minute private conversation.
However, Francis' mood lightened considerably during their gift exchange and the two men shook hands before parting.
More from NBC News:
Manchester arena suicide bombing: 'Heroes' ignored horror, chaos
Olivia Campbell: Mom mourns teen killed in Manchester arena suicide bombing
World's biggest aircraft nails critical test flight
"Thank you. Thank you. I won't forget what you said," Trump told the pope after their private meeting.
In the past, Trump and the pontiff have disagreed on issues including environmental protection.
During the election campaign, Francis criticized Trump's promise to build a wall on the Mexican border and his declaration that the U.S. should turn away Muslim immigrants and refugees.
"A person who thinks only about building walls, wherever they may be, and not building bridges, is not Christian," Francis said at the time.
Trump reacted to the pontiff's comments by calling Francis "disgraceful" for doubting his faith.
The pope's gifts to Trump included a medal by a Roman artist depicting an olive, which is a symbol of peace.
The president responded, "We can use peace."
The pope also gave him copies of his three main teaching documents. Some of the main themes contained in them contrast sharply with Trump's policies and campaign promises, particularly concerning approaches to the environment and income inequality.
The president told Francis he'd be reading them.
Trump's gift for the pontiff was wrapped in a big blue box. The president said he was delivering "books from Martin Luther King. I think you'll enjoy them. I hope you do."
The meeting with the leader of the world's more than one billion Catholics caps off a trip during which Trump visited the birthplace of Islam, Saudi Arabia, and then Jerusalem and Bethlehem — highlighting the president's outreach to Muslims, Christians and Jews.
Trump's reception in Europe was low-key compared to the extravagantly warm welcomes he received in Riyadh and Jerusalem. Greenpeace climate change activists projected the message "Planet Earth First" over St. Peter's Basilica on Tuesday night.
On Wednesday, protesters hung a sign saying "Rome Resists" on a bridge in the Vatican.