Negotiations restarted on Thursday to try to revive the 2015 deal between Iran and world powers, which the United States withdrew from under Donald Trump in 2018.
Iran claims it only wants to develop a civilian capability but Western powers say its stockpile of enriched uranium goes well beyond that, and could be used to develop a nuclear weapon.
US president Joe Biden has said he is ready to return to the agreement and Iranian officials maintain they are serious about committing to the talks.
But Western powers have accused Tehran of backsliding on progress made earlier this year and are playing for time.
Truss' comments are the first time a signatory to the original deal has given an ultimatum for the talks.
Russian troop build-up
Britain, which hands over the G7 presidency to Germany next year, portrayed the two-day conference in Liverpool, northwest England, as a chance to stand up to authoritarianism around the world.
As well as Iran, Russia's build-up of troops on the border with Ukraine dominated talks, given fears of a possible invasion of the former Soviet state.
Truss said there was "very much a united voice... that there will be massive consequences for Russia in the case of an incursion into Ukraine".
A senior US State Department official on Saturday said "a large number of democratic countries" were ready to join the G7 nations of Britain, Canada, France, Germany, Italy, Japan and the United States in taking action.
Biden earlier this week held a virtual summit with his Russian counterpart Vladimir Putin to voice Western concerns.
He is sending his top diplomat for Europe and Eurasian affairs to Kiev and Moscow next week to try to end the stand-off by diplomatic means.
Russia says the military build-up is a defensive measure against Ukraine moving closer to NATO.
Pope Francis brought up Ukraine when speaking to a crowd in St Peter's Square on Sunday.
"I would like to assure my prayer for the dear Ukraine, for all its churches and religious communities and for all its people, that tensions will now be resolved through serious international dialogue and not with weapons," he said following the Angelus prayer.
From Liverpool, US Secretary of State Antony Blinken flies on to southeast Asia as part of Washington's push for "peace, security and prosperity" in the Indo-Pacific region.
Britain's G7 presidency this year has been dominated by responding to Beijing's alleged widespread domestic rights abuses, as well as creeping authoritarianism in its former colony, Hong Kong.
Earlier this week, a panel of human rights experts and lawyers said China had committed genocide in its Xinjiang region by imposing population controls on minority Muslim Uyghurs.
Beijing rejected the report, accusing it of "anti-China" bias.
Truss said she and her counterparts were concerned about China's "coercive economic policies" and there was a need to counter them with their own initiatives as an alternative.
"What we want to do is build the investment reach, the economic trade reach of like-minded freedom-loving democracies," she added.
"That is why we're stepping up our investment into low and middle-income countries."
At a G7 leaders' meeting in June in Cornwall, southwest England, the grouping unveiled plans for what it said was a more equitable global infrastructure fund than China's Belt and Road Initiative.
The Chinese trillion-dollar scheme has been widely criticised for saddling smaller countries, particularly in Africa, with unmanageable debt.