A first-principles study of the electronic properties of a CaSO4 anhydrite structural phase has been performed. A theoretical estimation for the fundamental band gap (p → s transitions) is Eg = 9.6 eV and a proper threshold for p → d transitions is Epd = 10.8 eV. These values agree with the data obtained for a set of CaSO4 doped with Gd3+, Dy3+, Tm3+ and Tb3+ ions using the methods of low-temperature highly sensitive luminescence and thermoactivation spectroscopy. The results are consistent with theoretical predictions of a possible low-temperature self-trapping of oxygen p-holes. The hopping diffusion of hole polarons starts above ∼40 K and is accompanied by a ∼50–60 K peak of thermally stimulated luminescence of RE3+ ions caused due to the recombination of hole polarons with the electrons localized at RE3+. There is no direct evidence of the self-trapping of heavy d-electrons, however, one can argue that their motion rather differs from that of conduction s-electrons.