His remarks in Tehran on Saturday came a day after the Trump administration decided to reinstate all US sanctions on Iran removed under the 2015 nuclear deal.
"For 40 years, the challenge between America and Iran has continued and a variety of movements have taken place from the enemy's side - from the military and economic warfare to the media war launched by America.
"The goal of the United States in all this was to regain the domination it had in the era of the tyranny, but it could not," the Leader said, referring to the period before the Islamic Revolution when the Shah of Iran was a close US ally.
Ayatollah Khamenei addressed thousands of students on the eve of the 1979 takeover of the US embassy in Tehran, which is marked every year with nationwide rallies.
"There is an important fact here, that in this 40-year-old challenge, the American side has been defeated and the side of the Islamic Republic has been victorious," the Leader said.
"The reason for America's defeat is that it has started the attack but has not reached its goals," he added.