It's not gambling in the sense that you are walking into a casino and placing a bet on purely random outcome. Average people can have enough information to accurately predict risk in election outcomes. In that sense it may be more akin to something like poker or a sportsbook.
But unlike a sportsbook, I don't think you have the same risk of abuse. You are not being pressured to parlay your bets, you are betting on more limited events, you can sell your position at any time.
So on a spectrum from degenerate gambling to rational investing, I would say it errs towards the middle.