Hamas was elected as Bush pushed for elections too early as he wanted to solve the situation before his term ended, PA was unpopular due to corruption. When Hamas won the US pushed PA to do a coup which failed, this caused Hamas to take over Gaza completely and push out PA and stopping future elections.
Hamas is certainly the main problem now, but the situation was caused by typical US fuckery, Netanyahu supporting Hamas didn't help either. Others big problems are the apartheid state of Israel and their systematic stealing of land in the West Bank. If what they have in the West Bank is the kind peace that Israel wants then I can see why people are resisting them.