there is a big difference between the two, gambling is a game of money and you put money on rest know the result just to win or lose, but in investment you have to invest just for making money and there are very little chance to lose the money in investment.
No, there are a lot of chances to loose our capital money in investment too. Because, we are just analyzing an investment opportunity based on their past performance. But, there will be no guarantee that the past performance will be repeated in future too.
We can see many good reputed companies are getting bankruptcy overnight. So, there will not be any complete guarantee for our investment in the any business. In my opinion, both gambling and investment are having risks but based on different factors.