One of the injured was from Denmark and the other from Germany, the sources said. Security forces repelled the assault after killing one of the gunmen who was wearing a suicide bomb belt.
The attackers had arrived by sea to launch the onslaught on the beachside Bella Vista Hotel, security sources said.
The Islamic State militant group said on Friday an attack on Israeli tourists in Cairo on Thursday was carried out by its fighters, in response to a call by the group's leader, Abu Bakr al-Baghdadi, to target Jews "everywhere".
Security sources said those tourists were Israeli Arabs. None was hurt and Egyptian authorities said the attack was aimed at security forces.
A Russian passenger plane crashed in Sinai on Oct. 31, killing all 224 people on board, most of whom were tourists returning home from the Red Sea resort of Sharm al-Sheikh.
Cairo says it has found no evidence of terrorism in the crash. Russia and Western governments have said the airliner was probably brought down by a bomb, and Islamic State said it had smuggled explosives on board.
Tourism is a cornerstone of the Egyptian economy but has been badly hit by years of political turmoil.