Yes and No. Yes because in trading, there's a small element of guessing. No because, In trading the odds are not against you. In trading you can make 90% accurate prediction having acquired sophisticated knowledge of the asset and market, Trading doesn't depend on "luck". You really have to put in the work and do your own homework.
Agreed, the small element of guess could be right as well as wrong. Depending will be the profit/loss. With trading too luck plays it's role when you go with some unpopular project investment. Some gets lucky to make the best out of it, sometimes the same causes big loss. So, luck factor also makes a connect with trading which is part of gambling.