If you trade with emotions so yeah, trading and gambling are the same. But if you know the basics, you understand the only mutual thing is the risk.
Trading and gambling are two different things, either with emotions or not, what you will have to understand is their differences and the risk as you've mentioned already, being emotional is what can lead to any of the trading experience or gambling but that doesn't mean they are thesame, if you trade you earn with a little probability of loosing small amount of money, if you gamble you're liable to loose the whole money, trading is an investment while gambling a liability as some may believed.