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.
Though I have never done much trading but surely trading means buying and selling something but gambling is risking money on your decisions.