Actually, the word "escape" alone is problematic, because logically it means that someone is running away from what they should face, so this is also very risky to cause even bigger problems. As you said, gambling has an effect that can make someone feel at home for a long time to continue gambling, so it poses a risk because someone who "runs away from problems" brings unstable emotions, I can be sure of that. And maybe from that emotion it can cause something unwanted, instead of being able to relieve the problem, it actually makes the person even more stressed.
Some people escape from the reality by doing different things but they don't want to admitted that. They feels that they can not hold their emotion if they doing that thing so they decide to escape from that thing by doing other activities that can makes them forget their routine activities. Maybe that is what people did by escaping themselves in gambling so they use the word "escape" to describe their situation. But people should know that when they escape or run away from the problems, that will not solve the problem instead will gives more problems. So they must back to the problem and trying to solve it before they do other activities.