Yes, gravity has an effect. In most cases the effect is negligible.
Resin viscosity, fiber permeability, and fiber compaction supporting the vacuum bag, resist the effects of gravity on resin flow. Low resin viscosity and high resin content will magnify the effect of gravity.