The rule originates from a quantum mechanical selection rule, which states that during an electron transition, parity should be inverted.
A designation of g means there is symmetry with respect to an inversion center. That is, if all the atoms (or orbitals) are inverted across the metal center, the resulting compound would look exactly how it did before having inversion applied to it (this includes same orientation in space). A designation of u means there is asymmetry with respect to the inversion center.
The rule basically says that having inversion symmetry "forbids" transitions. However, this isn't the case — forbidden transitions still can be observed experimentally. For various reasons, such as the Jahn-Teller effect and asymmetric vibrations, complexes are not perfectly symmetric all the time. With the loss of symmetry, the Laporte rule no longer applies. Transitions that would theoretically be forbidden, such as a d → d transition are now possible.