Mohammad Javad Zarif made a surprise appearance at the summit in Biarritz on Sunday for talks with French President Emmanuel Macron, who is seeking to broker a deal between Iran and the United States.
Zarif also met with French and other European diplomats, but Trump said it was "too soon" for him to meet Zarif.
"I knew everything he (Macron) was doing and I approved everything he was doing," Trump said, adding that the French president "asked for my approval".
In early August, Trump lambasted Macron for sending "mixed signals" on Iran, and at the end of July the US administration imposed sanctions on Zarif.
Trump has put in place a policy of "maximum pressure" on Tehran over its disputed nuclear programme via crippling sanctions that are seen as raising the risk of conflict in the Middle East.
The US president unilaterally pulled out of a landmark 2015 international deal that placed limits on Tehran's nuclear activities in exchange for trade, investment and sanctions relief.
"I believe that for our country's national interests we must use any tool," Iran's President Hassan Rouhani said of his top diplomat's Biarritz visit in a speech aired live on state television on Monday.
But hardliners criticised the initiative, with the ultra-conservative Kayhan newspaper saying the trip was "improper" and sent "a message of weakness and desperation."
Some analysts also cautioned against optimism about Macron's mediation efforts.
"There is considerable room between what President Trump says and what he thinks one day, and what he says and thinks the next," Robert Malley, head of the International Crisis Group, told AFP.