Upvote:2
It is very difficult to answer this question, because a war could have few risks at its beginning, and becomes very dangerous as long as fights occurred.
This is the case for the Second Punic war: when the Romans entered it (and Carthago was more involved in the process of launching the war than Rome), they thought the danger would be for Sicily and Spain: far enough from Rome. Later on however, the war became the most dangerous for Rome ever (except for the defeat against Brennus, civil wars and the Barbarians invasions that were actual defeat) because Rome was threatened of siege.
If you consider a war dangerous at its beginning, and I think this is more suited to your question because you spea of "gamble" and not about how the war actually turned out, then the war against the Samnites were the most dangerous because Rome was close for the combat fields and the Samnites were powerful. In fact, Rome suffered a defeat and survived only because it could negotiate an agreement.