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.