Investing and trading are not gambling but it went to that situation if that person has no knowledge about it. Many people underestimate the market volatility, they'll though that knowing the basics is trading is just okay but that is not how trading works because if this is only what is in our mind, we'd better stop doing this as it results in losses. We can't force ourselves to become a trader unless we have the courage and willingness to change our wrong mindset and market approach.
There is no need to compare trading with gambling or anything else, because there are downright bad traders and there are excellent gamblers. And those who trade without proper knowledge, or bet on luck, will always lose more than they earn. I am inclined to believe that there are more chances to make money in trading than in gambling, so gambling is like entertainment for me, and I take trading much more seriously and spend much more time on it.