Gambling is the risk of some present moment utility in the hope of increased future utility. Gambling may take many forms, some obvious - others not so. For example:
National/State lotteries
Roulette
Slot machines
Card games
Betting on sports such as horse racing, football...
Investments
Making a life-changing decision such as moving, changing job, getting married...
The above examples differ in whether outcomes are totally random - eg lotteries and roulette, or whether advantage may apparently be gained from application of knowledge and intellect, eg sports betting, investment. They also differ in their odds, or probability of success.
Buying a lottery ticket is really buying a dream. The chance of success is extremely slim, but until the draw is made or the result checked there is that real chance it could be you! On the other hand, though investments may vary hugely in risk we hope that whatever we place in what we describe as "investments" will eventually yield a positive return. In the middle of course lie activities like card games and sport betting in which we have genuine hope of success, but no guarantee.