I personally don't believe investing in the market is gambling, but even if it were, that doesn't necessarily mean you can't consistently make money from it. Some of it is luck, some of it skill.
Investing in general is about probability. An example: I am working on a deal right now.
If it goes through I put $100k at risk by investing in an asset. Absolute worst case I can resell that asset for $50k, but I can probably sell it on for $100k. Best case if everything pans out I make $3m. The chance of that happening is probably around 50%. Those are odds I like. Lots of upside, almost no downside. Some publicly traded stocks are like that.