At the end of the Book of Esther, the world gets turned upside down (or, right-side up): the bad guy who seemed to be on the verge of a horrible victory gets hanged, the good guy takes his place in the king's court, and the party of people about to commit a massacre become massacred themselves. Everything runs in reverse, overturning all expectations.
As for the gallows itself, well, it's really big (75 feet)—outlandishly and pointlessly so. It demonstrates the egotism and wicked madness of Haman to the world (even though building it was technically his wife's idea). He constructs the gallows as a horrible, over-the-top way of pursuing an unjust personal vendetta—killing Mordecai—but it backfires and ends up being used to kill the person who built it. The irony—the ancient irony!
It's karma, yo, or the Jewish version of karma—poetic justice or divine justice, we suppose. But so what? Sure that makes it a more dramatic story, but does it have any symbolic meaning beyond that?
Secret Meanings in the Stars?
At least, in the history of Jewish interpretations of the book, it does have a deeper meaning. One medieval Jewish commentator claimed that the reason Haman builds such a big gallows is that astrological predictions had stated that Mordecai would eventually be "above Haman's house" (meaning he would have control of it). So, Haman tried to reverse the prediction by hanging Mordecai literally "above" his house on a really tall gallows.
That's clearly pretty "out there" as an explanation (though it's sort of clever too). But the main thing to say about the gallows-switch might be that it shows how, when evil seems like it's about to win out over good, it can suddenly all be flipped around.