If you have more than one gateway a decision must be made for each outgoing packet which gateway it should be sent to. This obviously depends on the packet's target address, which must be matched against the available gateways. So maybe you can say: the netmask defines what address range a gateway is responsible for.
Real world effect: you might require different gateways to reach different networks, for example in companies running separate networks for branches or locations.
A netmask of 0.0.0.0 means all outgoing packets are routed through this gateway ("to all nets").
A netmask of 255.255.255.0 means only packets that belong to the same class c network are routed through that gateway. Other packets must be routed using other gateways or don't have to be routed at all (which would be odd...).