Iran has nearly tripled its stockpile of enriched uranium since early November, the United Nations’ atomic agency said Tuesday, prompting warnings from experts and diplomats that Tehran has slashed the time it would need to amass enough fuel for a nuclear weapon.

Iran’s growing stockpile of enriched uranium may pose a major test for President Trump ahead of the U.S. presidential election in November. Mr. Trump has vowed to prevent Iran from obtaining a nuclear weapon. His administration has imposed harsh sanctions to press...