No, it's not gambling, not if you are actually investing instead of speculating.
The key difference is, that when you gamble, you don't actually get jack shit in return. When you invest, you get shares in a company in return. Big ass difference.
Now, I'm not saying that there isn't a chance that the shares could become worthless, but that's the risk in any enterprise.
Then again, Med, you probably think opening your own business is gambling, which it is, if you fail to properly plan and execute. As its said, "Prior Proper Planning Prevents Piss Poor Performance."