The explanation provided by Sloane2024 was good, not bad for Wikipedia!
I would like to add that as they lay those palm branches before the Messiah, it was a form of obescience as the righteous and, or saints are represented at times as trees in the scriptures.
For example: Isa 61:3 To appoint unto them that mourn in Zion, to give unto them beauty for ashes, the oil of joy for mourning, the garment of praise for the spirit of heaviness; that they might be called trees of righteousness, the planting of the LORD, that he might be glorified.
And: Psalm 1:3 And he shall be like a tree planted by the rivers of water, that bringeth forth his fruit in his season; his leaf also shall not wither; and whatsoever he doeth shall prosper.