CAIRO—Tens of thousands of Egyptians tore through cordons of barbed wire and riot police and surged against the gates of the Presidential Palace in Cairo on Tuesday, as anger mounted over what they called a power grab by the country's Islamist president.

The crowd remained into the early hours Wednesday, with protesters massed at the palace wall and police stationed inside, echoing a standoff that pits Egypt's ruling Islamists against nearly every other political force over the country's hastily drafted constitution and President...