The Pope invited the couple into the Apostolic Palace and exchanged gifts.
Frederik and the Pope were pictured sharing a laugh as they conversed in Italian in front of a private audience.
The couple's tour is focusing on solutions in health, climate change, water and energy, urbanisation and sustainable food production.
The visit also aims at strengthening relations between Denmark and Italy and support the position of Danish companies in Italy.
Earlier in the week Mary and Fred were received by the the Italian President Sergio Mattarella for lunch at the Palazzo del Quirinale presidential palace.
The couple looked to be in good spirits as they posed for photographs.
Fred looked his usual dapper self in a three-piece navy suit, while Mary opted for a glamorous dress paired with Nike sneakers.