The key factor is your character's level. The higher the level of the character doing the gambling, the better the odds of rolling a genuinely good item.
You'll occasionally land something very useful, but be realistic: over time, gambling tends to drain more gold than it returns. Treat it as a fun gamble rather than a reliable way to gear up.