It's a common refrain, but I don't agree that it's correct. You're essentially boiling the definition down to the degree of risk:
If (risk > some_threshold) then gambling = true; else gambling = false;
With derivatives your risk is often greater than with traditional stocks. But that's not universally true. If you invest in a startup your risk is massive, whereas if you invest in a well diversified and low leveraged portfolio of derivatives your risk might be substantially lower.
And in any case, so what? If you place a small bet on every number of a roulette table your risk is essentially zero: you'll simply make a guaranteed fixed loss of 5.26% on every spin. On the other hand, if you invest in the Vanguard Total Stock Market index tracker, you might hope to make around 8 to 10% per year, but in some years (e.g. 2008) you might make a big loss (37%), so the risk is significant. Yet I think most people would agree that the former is gambling while the latter is not.
The important factor isn't how much risk you take on, it's whether a sufficiently skilled person can achieve a positive mathematical expectation over a series of similar bets.