Most people comparing this because both involve risk but in trading if you have a good choice on what coin you will be buying you can avoid risk.
It is indeed similar to gambling
You have a bet, and a reward
What makes them differ is that gambling only rely on lucks and percentage of winning is lesser than the gambling operators
Trading has analysis and market references, so winning is much higher and also has a risk management