no i do not consider trading as gambling although both are risky but still trading is a little safe than gambling, in gambling you never a chance to return your money back.
As long as you go for longer term trading then it is more safer than gambling but if you want to make a quick bucks from trading like day trading then it is almost equal to gambling. So if you want to earn money from trading then don't ever go for day trading.