Somewhere between 2.5-3 cm I guess. But in pretty sure a hamster would not attempt to through unless he/she is sure she can make it through. Gaby usually tests the gap before going all out. I've noticed this often especially when I'm holding her and she's walking from hand to hand. Sometimes she likes to squeeze through my fingers, but if she feels its too narrow, she usually turns around.
I mean, hamsters are pretty smart!