On the surface, the similarities are in the way that casinos and the market operate. It is obvious that in the cases of both the casinos and the market, you "pays your money and you takes your chances." However, the more important similarity is in the mindset of the players.
Gamblers go to the casino hoping for the big win. We all hear about the person who put a quarter in a slot machine and left the casino with a million dollars. We all think that we could just as easily have been the lucky winner; all we had to do was put a quarter in that machine at the right time. On an intellectual level, we know the enormous odds against that huge win, but hope and optimism spring eternal, and so casinos thrive.
Unfortunately, the market is like a casino for too many people. They hear about the guy who bought an unknown stock on a tip from his brother's barber's cousin and watched it turn into the next Microsoft. And like a gambler, they think that they could just as easily have been that lucky winner. So, in the same way a gambler puts a quarter in a slot machine, they buy a stock. And then they check the market every 20 minutes for the next month, just like the gambler watching the wheels turn on a slot machine, waiting for that imminent million-dollar payout. If it doesn't pay off, they pick another stock, just a gambler going to a "hotter" slot machine.
However, the market does not operate exactly like a casino. In a casino, the longer you play, the more you will lose. In the market, the longer you play, the more likely you are to win. There have been people who made a quick killing in the market, just as there have been people who left the casino with a profit -- but they are the exception, not the rule. Money is made in the market by buying quality and holding it over the long run.
So the answer to the question really is a little more than "No! Casinos are gambling and the stock market is investing." That's just Part I of the answer. Part II is: "Realize the difference and don't try to treat the market like gambling."