Every warning sign that says "hazard" is, by descent, talking about a game of dice.
Hazard entered English around 1300 as the name of a dice game. It came from Old French hasard, which the Oxford English Dictionary records as a dice game around 1150. The game was played with two dice. The caster called a number, then threw, and winning or losing depended on a set of rules about which totals came up.
Where the French word came from is the hard part. The answer most often repeated is Arabic. On this account, az-zahr, "the die," passed into Spanish as azar and then into French. William of Tyre, a 12th-century chronicler, told a different story: Crusaders invented the game while besieging a castle called Hazart, the town of Azaz. Wikipedia notes that this origin "has been called into question."
The Arabic theory has real problems. Etymonline calls it "doubtful," because zahr does not appear in classical Arabic dictionaries. The OED, quoted on the Languagehat blog, says the form al-zahr is not attested in classical Arabic. Its dates put French hasard about a century before Spanish azar, and it notes that this argues against the Spanish route. Another proposal, from the etymologist Klein, is Arabic yasara, "he played at dice."
The final -d is easier. Etymonline says French added it through confusion with the native suffix -ard.
The meaning grew out of the game. In French, hasard came to mean chance in gambling, then the chances of life in general. English followed. By the 1540s a hazard was a risk of loss or harm, and the verb, "to put at stake," arrived in the 1520s.
The game itself had a long life. Chaucer mentions it in The Canterbury Tales, and in the 1600s and 1700s it was played for money across England. Simplified in the 1800s, it became craps, the dice game still popular in North America.
So the origin of the word is itself a gamble. The French source is certain. Everything before it is still a roll of the dice.