From Diablo Wiki
When gambling in D2, players spent a set amount of gold (which scaled up with Character Level) to buy an item of a known type. The item's stats were randomly generated, as if it was being dropped by a monster, and while the vast majority of gambled items were simply magical, they could occasionally turn out rare, set, or even unique.
With so many modifiers in the game, the odds of gambling an item with useful stats, especially in the end game were very poor, but with nothing else to spend gold on, most players gambled quite a bit. The most popular gambled items were rings or amulets, since they had better odds to spawn with good mods, and were less expensive to gamble for at high levels.
- See the page for full details.
 Gambling in Diablo III?
While Jay Wilson was initially undecided on gambling, the developers have more recently said that gambling, as it worked in Diablo II, will probably not return in Diablo III, since crafting items with the Artisans serves much the same purpose, but better.
Bashiok spoke on this in August 2010.
As far as a system dedicated to gambling, there are no current plans, but as I just said gambling could be pulled off a whole lot better through the crafting system directly. If we thought those types of recipes were a good idea.Which I have no idea if we do. ‘We’ being other people that decide these things