In a speech marking the Muslim festival of Eid al-Fitr, Khamenei said Israel was acting like a "rabid dog" and "a wild wolf" in acts that are causing a human catastrophe and which must be resisted.
"A people surrounded in a small place with closed borders, unsure of having water and electricity, this population faces an armed enemy," he said of three weeks of fighting in the Gaza Strip that has killed more than 1,100 Palestinians and 53 Israelis. "The people resist unabated. This is a lesson for all."
Khamenei dismissed talk of a ceasefire in Gaza, saying it was a ploy by the United States and European states to save Israel and said Hamas should be re-armed, rather than disarmed as otherwise they will be "unable to defend themselves".
"The US president issued a fatwa that the resistance is disarmed so that they cannot respond to all those crimes (committed by Israel)," the supreme leader said, referring to a call by Barack Obama for the "disarmament of terrorist groups and the demilitarisation of Gaza".
"We say the opposite. The world and especially the Islamic world should arm ... the Palestinian people," Khamenei said.
His comments follow rallies held across Iran on Friday in a show of support for Palestinians and to protest against Israeli military action in Gaza. Iran does not recognise Israel's existence and supports Palestinian Islamist groups that fight it.
On Thursday, the speaker of Iran's parliament, Ali Larijani, told state television's Arabic service that Tehran had provided Hamas with the technology it has used to rain down rockets on Israel.
During the last major conflict in and around Gaza in November 2012, Larijani said Iran was proud to have provided "both financial and military support" to Hamas.
Israel accused Iran of supplying Gaza militants with its Fajr-5 missile, which has a range of 75 kilometres (45 miles), during that conflict.