Gazans can freely visit Egypt, as long as they follow Egyptian rules. And those rules include having a valid passport from the PA.
There is only one problem: Hamas refuses to create passports for Fatah members, and the PA is refusing to give out blank passports to Hamas."