If you open the Catechism of the Catholic Church (CCC) to the index and look up “gambling”, you will find “games of chance” listed with paragraph 2413. In that paragraph it says:
2413 Games of chance (card games, etc.) or wagers are not in themselves contrary to justice. They become morally unacceptable when they deprive someone of what is necessary to provide for his needs and those of others. The passion for gambling risks becoming an enslavement. Unfair wagers and cheating at games constitute grave matter, unless the damage inflicted is so slight that the one who suffers it cannot reasonably consider it significant.
Let us dissect it:
First, all games of chance, with or without wager, in and of itself is not wrong. This therefore includes gambling in the casino or elsewhere.
What makes it wrong is when:
1. It deprives someone’s basic needs, namely, the person one gambles against, the person himself and those dependent on him. Gambling in such a way that it reduces others to be in want is therefore wrong; gambling away beyond one’s means is therefore wrong; gambling away a family’s wealth or what one needs to provide for one’s family is wrong,.
With this is also the vice of greed. When games of chance is no longer for fun, but is driven by greed for oneself and often also the deprivation of others, it is morally unacceptable.
2. It becomes an addiction, especially when it means the person is spending excessive amount of time on it, and/or is not being responsible for his commitments at home or at work. This usually would also be accompanied with denial, lying, abusive behaviours and even theft and violence.
Note that for gambling to be an addiction, the person does not need to have lost large sums of money, or even any money. It is not the amount of money involved that makes it an addiction. Addiction is a mindset: it is when someone cannot say no to it.
3. It involves cheating or unfair play. This is grave matter. When committed with knowledge and intention, it is a mortal sin.
The paragraph modifies this last part saying that it would be acceptable only if the cheating or unfair odds are so small that it is merely a joke or something everyone finds entertaining. With this, one should still be cautious against developing a habit of dishonest play. Just like so-called telling a harmless white lie, its insidious nature is not in the gravity of the lie itself, but in the mind being habitually at ease with accepting untruths And associating dishonesty with fun.