The Paris deal is the world's first comprehensive climate agreement, set out in 2015, with the aim of keeping the global average rise in temperatures below 2C.
Climate was among the most disputed issues separating Trump from other leaders at the two-day meeting on the Sicilian coast.
Trump tweeted he would decide on Paris next week. He also said during his presidential campaign that he would cancel the deal, and has infamously and repeatedly called global warming a hoax perpetrated by the Chinese (and scientists) - but Trump says a lot of things, and has, at least a few times, also hinted that he understood the threat of climate change.
US President Donald Trump arrives for a working session with outreach countries and worldwide organisations at the G7 Summit, in Taormina, Italy May 27, 2017. This would be the most extreme option because it would take the USA out of all global climate diplomacy.
"I hope this phase will end soon, and will end well", Gentiloni added.
Trump also signed a $110 billion arms deal in Saudi Arabia and visited the western wall in Jerusalem.
"We respect President Trump's choice to reflect further on their engagements around climate change and the Paris accord", Trudeau said.
German Chancellor Angela Merkel told reporters the climate debate was "controversial" and that the leaders of the other G7 nations - France, Japan, Canada, the United Kingdom and Italy - all urged Trump to remain a part of the 2015 agreement.
This is the ideal metaphor for what Donald Trump has done to the United States image of strength and vitality around the world.More news: Arsenal win FA Cup for the record 13th time by defeating Chelsea
More news: James passes Jordan; Cavs back in Finals
More news: No surprise: It's Cavs-Warriors in the Finals, again
Unlike other G7 leaders, he is not due to give a press conference before flying out.
They restored a vow to fight protectionism - the use of import taxes and skewed regulations that favor domestic producers over their foreign competitors.
The source said G-7 members were still wrestling over a statement on trade and whether it would condemn protectionism, as previous G-7 statements have.
In its final summit statement, the grouping of wealthy nations said free and fair trade was vital to job creation.
However, the other G7 leaders pledged to "reaffirm their strong commitment to swiftly implement the Paris Agreement".
There was agreement in some areas, most notably the efforts to confront terrorism, where leaders were galvanized by the deadly attacks in Manchester, Britain just before the start of the G7 talks. This will put him in an opposing role against the climate change pledge.
"There have been differences, to be sure, in some past summits, but not a sharp open split like this", he said.
French President Emmanuel Macron struck a more positive note, saying the talks had been useful with "a real discussion and exchange of views".
The G-7 is an informal gathering that meets every year under a rotating chairmanship. Its decisions are not binding as an global treaty would be, simply representing the leaders' political commitment to carry through on their collective decisions.
Diplomats from Britain, Canada, France, Germany, Italy, Japan and the United States worked late into the night to agree on the final communique, which was expected to be little more than six pages long, against 32 pages a year ago.