I think the only comparison I can make between trading and gambling is that you can lose a lot of money, and that in both activities, as a player/trader, you must have money prepared to lose.
Otherwise, I don't see any comparison, because trading should be done because you know what you're doing, and you can lose even with analysis. Gambling, on the other hand, is almost 95% pure luck.
If you don't use your skill in trading and only predict, you can lose huge money. But if you can analyze the market and know what you need to do, you will prevent the loss and make a profit.
Besides that, it is right you can lose your money in trading but you can recover your losses when the market is back to normal. So you can make a profit only if you use your skill and that is different than gambling. You can loss huge money in gambling but you will difficult to recover your losses.
We don't have to compare between gambling and trading because that is different. But both can make us loss too much money especially if we chase or recover our losses.
Gambling is far different from trading, I don't even understand why some people see it as to be the same, that's probably because they don't have a concrete knowledge about trading. I listened to someone who said that trading is an advanced scam of gambling, and just that his statement alone made me to know that he doesn't have a good knowledge about trading at all. We know that both trading and gambling involves a high risk but trading is very much better than gambling, it's better to handle trading as source of income but not gambling.