The assailants shot randomly at the people as they left the church, the sources said. It was not immediately clear if the two people killed were Christians, they said.
Coptic Christians make up 10 percent of Egypt's 85 million people, and have generally coexisted peacefully with majority Sunni Muslims for centuries, despite bouts of sectarian tension.
But the army's overthrow of elected Islamist President Mohammed Morsi on July 3 has been followed by the worst attacks on churches and Christian properties in years.
The immediate trigger for the attacks was a bloody security crackdown in Cairo on Aug. 14, when police dispersed two Islamist protest camps set up to demand the reinstatement of Morsi, and killed hundreds of his supporters.