In my mind, Israel has no one but itself to blame for the attacks by militants in Gaza. Israel runs an oppressive, brutal, military occupation of much of the Palestinian territory. This is what happens when tyrannical regimes press the people too far. While I abhor violence, and think it is always wrong, I nevertheless sympathize with the Palestinians. The following quote from Walter Wink helps explain my thinking:

Violence is contrary to the gospel. But we are not always able to live up to the gospel. I am embarrassed at how easily I can lash out at anyone who makes me angry (it is the lashing out, not the anger, that disturbs me). Even so, when as individuals or as nations we are unable to act nonviolently, we are not excused for our actions, nor may we attempt to justify them. But we also cannot condemn those who in desperation resort to counterviolence against the massive violence of an unjust order. We must wish them success, even if they are still caught in the myth of redemptive violence themselves. Who knows; perhaps their victory will usher in a better society able to divest itself of some of its oppressive elements, as revolutionary Nicaragua was doing until the U.S.-backed Contras sabotaged the effort. (from The Powers that Be by Walter Wink.)