Hamas' green dominated the gathering, where some children wore military uniforms and others carried guns. Masked gunmen holding automatic rifles flanked the podium where Mashaal gave a fiery speech.
"We are not giving up any inch of Palestine. It will remain Islamic and Arab for us and nobody else. Jihad and armed resistance is the only way," Mashaal said, referring to holy war. "We cannot recognize Israel's legitimacy."
Mashaal said he would continue to secure the release of Palestinian prisoners from Israeli jails - referring to a swap last year where an abducted Israeli soldier was exchanged for more than 1,000 Palestinian prisoners.
Mashaal, 56, who left the West Bank as a child and now leads Hamas from the Persian Gulf state of Qatar, entered Gaza on Friday via Egypt.
Hamas has received a boost from the political ascension of its parent movement, the fundamentalist Muslim Brotherhood, after last year's Arab Spring revolts - especially in Egypt.
It has also raised its profile as master of the Gaza Strip, leading it through the bloodiest round of fighting with Israel in four years and coming to a cease-fire arrangement in talks brokered by Egypt.
Hamas claimed victory in the conflict after holding its own despite air strikes and maintaining an almost constant barrage of rocket attacks on Israeli cities.
The Nov. 21 cease-fire stipulated Israel would stop targeting extremists. That, along with unprecedented support from Egypt, allowed Mashaal to make the visit without fear of Israeli assassination, which he has narrowly escaped in the past.
Israel, the United States, and the European Union list Hamas as a terrorist organization. Israel is now holding indirect talks with the group as a result of the cease-fire arrangement.