What is sin? It is the transgression of God's laws. Thou shalt not gamble isn't exactly in Scripture, however, God does judge our thoughts and our motives. Most people who gamble want money and they want money by not working for it.
I believe the apostle Paul mentioned, "If anyone will not work, neither shall he eat," 2 Thessalonians 3:10.
Proverbs also says, "Wealth gotten by vanity will be diminished, but he who gathers by labor will increase," Proverbs 13:11.
Another way you can look at gambling is to ask yourself, would you see Jesus betting at the race track or doubling down in Vegas?