No, investing isn't gambling, it's not black and white like that.
There's more of a scale. At one end you have "gambling" and at the other you have "investing". At the far gambling end of the spectrum you have games of chance (e.g. roulette), binary options (which is gambling dressed up to look like investing), slot machines etc - basically all the types of things where the house always win. At the other end you have things like bonds, traditional long term buy and hold in blue chip companies etc. There's still some risk but on that end of the spectrum, it's not a zero sum game nor "the house always wins".
If you say all investing is gambling because there's some risk and can never be a sure thing, then you get to the reductio ad absurdum argument that absolutely everything is gambling, e.g keeping your money in a savings account is also gambling because that's not a sure thing either.