  We establish a universal relation between the energy gap and the static
dielectric constant for all insulating states. This relation yields an upper
bound on the energy gap, which only depends on the electron density and
electronic dielectric constant. We identify two types of energy gaps associated
with transverse and longitudinal excitations at long wavelength, which
correspond to the optical gap and the plasmon energy respectively. Their upper
bounds are set by the dielectric constant and its inverse respectively. The
transverse gap bound is calculated for a wide range of materials and compared
with the measured optical gap. A remarkable case is cubic boron nitride, in
which the direct gap reaches \SI{72}{\percent} of the bound.
  Our results are derived from the Kramers-Kronig relation and the $f$-sum
rule, and therefore rest on general physical principles.
