We present rigorous upper and lower bounds for the zero-momentum gluon propagator D(0) of Yang-Mills theories in terms of the average value of the gluon field. This allows us to perform a controlled extrapolation of lattice data to infinite volume, showing that the infrared limit of the Landau-gauge gluon propagator in SU(2) gauge theory is finite and nonzero in three and in four space-time dimensions. In the two-dimensional case we find D(0) = 0, in agreement with Ref. [1]. We suggest an explanation for these results. We note that our discussion is general, although we only apply our analysis to pure gauge theory in Landau gauge. Simulations have been performed on the IBM supercomputer at the University of Sao Paulo.