Issuers often classify online gambling purchases as cash advances. Even if your card issuer doesn't strictly prohibit online gambling purchases, there's another concern that can make using your card risky. Some issuers will classify online gambling and similar cash-like  purchases as a cash advance.
Can you use credit cards to make deposits at online gambling sites so you can place bets? You can generally try, especially if your card is a Visa or Mastercard (and, to a lesser extent, American Express and Discover).