It's not gambling if you learn the counters
Consider this, one of the main objectives is to control vision, usually this means rushing early game with a worker so you can check out their base, and see what they are building. Once that is done you will probably want to raid to check out further, waring in zealots, using reapers, or burrowed lings. You need to see what your enemy is doing.
Then you need to build units to counter him.
And you also need to be able to by dynamic and fluid, building whatever you need to counter your enemy. It is all about strategy.