I consider trading as a professional activity. It requires analysis, research and others knowledges. Gambling you just require luck. But yes, maybe there is a thin line between then. It depends on how you do trading.
Not all traders did deep research and analysis, they do buy and sell based on their feeling only. On such cases, trading can be considered as gambling, but for those who did trading in the right paths(do research, analysis etc), they arent gamblers!