The story
According to the Chambers Dictionary (Edinburgh: Chambers Harrap, 1998) the phrase is “from the old Arabic or Jewish idea of a wise man dispensing justice under a palm tree.” Namely: And she dwelt under the palm tree of Deborah between Ramah and Bethel in mount Ephraim: and the children of Israel came up to her for judgment. (Judges 4:5)
Etymology from Wiktionary, CC BY-SA 4.0.