The protests, led by Iranian-backed militias, mark a new turn in the shadow war between Washington and Tehran playing out across the Middle East.
U.S. President Donald Trump, who faces re-election in 2020, on Tuesday threatened to retaliate against Iran but said later he did not want to go to war.
The protests also cast uncertainty over the continued presence of U.S. troops in Iraq.
Crowds had rallied on Tuesday to protest against deadly U.S. air strikes on militia bases, setting fires, throwing rocks and smashing surveillance cameras. They did not breach the huge embassy's main compound, however.
Overnight, demonstrators pitched tents and camped outside the embassy walls. On Wednesday morning, they were bringing in food supplies, cooking equipment and mattresses, Reuters witnesses said, suggesting they intended to stay for a long time.
Senior Iraqi army officers had negotiated with those gathered outside the embassy in an attempt to convince them to leave but failed to do so. Washington is putting pressure on Iraqi leaders to ensure the security of its staff.
The incident marked a sharp escalation of the proxy conflict between Washington and Tehran - both influential players in Iraq - while mass protests are challenging Iraq's own political system nearly 17 years after the U.S. invasion that toppled Saddam Hussein.
The protests followed U.S. air strikes on Sunday on bases operated by the Iranian-backed militia Kataib Hezbollah inside Iraq which killed at least 25 fighters and wounded 55.
The strikes were retaliation for the killing of a U.S. civilian contractor in a rocket attack on an Iraqi military base, which Washington blamed on Kataib Hezbollah.
Iran's Supreme Leader Ayatollah Ali Khamenei on Wednesday y condemned the U.S. attacks.
"The Iranian government, nation and I strongly condemn the attacks," Iranina state TV quoted Khamenei as saying.
Trump accused Iran of orchestrating the violence at the U.S. Embassy and said Tehran would be held responsible. Iran rejected the accusation.
More U.S. troops were being sent to the embassy, U.S. officials said. The 750 troops would initially be based out of Kuwait. The officials said that as many as 4,000 troops could be sent to the region in the coming days if needed.