The difference between gambling and speculating is in how risk can be managed. Managing risk is what separates a “trade” from a “gamble.”
To speculate comes from the Latin word, “speculari” meaning to contemplate, to look at or to observe.
That is what traders do. They examine an opportunity, contemplate its outcome and act on their intuition and instincts. If they are wrong, they cancel their position and then re-examine the opportunity.