Waving Egyptian flags and Hamas banners, the demonstrators gathered after Friday prayers and then marched to the former Egyptian embassy which has been closed since 2007.
The marchers held aloft placards called on Egypt to revoke Tuesday's decision chanting "resistance, our way is resistance!"
Egypt has accused Hamas of colluding in attacks on its territory in the past few years, and aiding the Muslim Brotherhood movement of deposed president Mohamed Morsi.
Hamas slammed the ruling as playing into the hands of its Israeli occupation regime, calling it "shocking" and warning it could "open the door to new (Israeli) aggression and war against Gaza."
Egypt hosted Hamas's deputy leader Mussa Abu Marzuk following Hosni Mubarak's overthrow in February 2011, and eased passage through its Rafah border crossing with Gaza.
Morsi, elected in June 2012, was seen as helping Gaza by mediating a 2012 truce ending week-long fighting with Israel and that lifted some of the blockade restrictions on Gaza.
Since ousting him, the military has destroyed hundreds of smuggling tunnels under its border with the coastal enclave.
The tunnels are considered as the only way to enter basic humanitarian supplies to Gaza which is suffering from a strict and illegal siege imposed by Israel since 2006.
SHI/SHI