This blog post gives a very interesting possible origin for the phrase Open Sesame. It says that the Arabic word simsim, in addition to meaning sesame, is also a rare literary word for gate.
Thus, the original French translation of sésame, ouvre-toi would correspond in Arabic to either gate, open thyself or sesame, open thyself. Ali Baba's brother-in-law, not knowing the obscure other meaning of simsim, takes it for sesame, open thyself. And then he forgets which grain was the key word, sealing his doom.
If this is the origin of open sesame, it seems likely that Galland actually collected an obscure Arabic folk tale, which has now vanished from the Arabic literature and oral tradition. There's no reason to posit that he chose sésame because it sounded like the Hebrew word for password.
In fact, that same blog post says that the blogger could find the Hebrew word sisma (meaning signal or password) only in one document before modern Hebrew, and that it's in fact a word borrowed from Greek: syssemon (σύσσημον). This word appears in the Bible in Mark 14:44 – Now the betrayer had arranged a signal with them: "The one I kiss is the man; arrest him and lead him away under guard."
So it was a very uncommon Hebrew word when Galland wrote or translated Ali Baba and the Forty Thieves; it doesn't seem likely that Galland would have known it, and it is thus unlikely to have provided the inspiration for open sesame.