If you look at the Iran-Contra affair (mostly around 1985), you'll see that the middleman in the arms for money/hostages deal were Israeli companies.
Were Israeli-Iran relations better at that point? I assume the Israeli government knew about that deal. Was it just because, at the time of the Iran-Iraq War, "the enemy of my enemy is my friend"? At the same time, Hizbollah already was active in Lebanon, so that bit of irritation existed already.
What changed? Palestinians are mostly Sunni, are they not? So not an obvious faction for Iran to support. And both countries are far from each other. What motivated the escalating enmity, besides Iran's nuclear ambitions?