Any stock you buy is gambling as well because no one on this earth knows if the price will be higher in the future.
You are perfectly correct with that statement. One difference is that the company may be appreciating in value due to it making a profit, thus increasing the stock price, but for the most part stock trading is also gambling.