Trading is not really a gambling because if you know exactly how to trade your chances of winning is higher than 50%.
Actually, there are types of trading which can be considered gambling to some extent, the first one that comes in mind in options and binary trading, in which all you do is make a bet on whether the price of a coin, stock, or commodity will go up or down in the near future. However, it still has its differences from gambling.
Even in options or binary trading, you can still do analysis and make it most of the times unless you are trading on a very short timeframe. Someone who understands the market they are trading in and has good technical analysis skills, they can make money from binary trading, but it's still very risky because you can lose a lot of money if your trades don't work out.