Based on the quasi-chemical equilibrium theory of superconductivity, we give an explicitly gauge-invariant proof of the Meissner-Ochsenfeld effect (magnetic field expulsion from a superconductor). The essential condition for a Meissner effect is the Bose-Einstein condensation of electron pairs. Other aspects of the problem, such as the energy gap and plasma waves, are not necessary for the Meissner effect and do not appear in our calculation. We do not make use of the random phase approximation.