They can't vote for Knesset because Gaza is not part of Israel and they are not Israeli citizens. About 20% of Israeli citizens ARE Palestinians, but none of these live in Gaza.
This would not mean they couldn't travel to Israel to work, shop, visit, or get medical care, and they used to do so. But there were too many terrorists taking advantage of this policy to bomb Israeli civilians, mainly children and women. Finally, to save the lives of Israeli children, Israel had to stop the old policy. It has worked; terrorist attacks in Israel are pretty much ended, except for the rocket bombings from Gaza.