The GaAs doped with donors manifests long times of spin relaxation, while in the case of acceptors (or magnetic impurities) spin relaxation rate increases markedly, in accordance with theoretical predictions. From the practical point of view, this situation is unfavorable, since the devices based on spin degrees of freedom require long times of the spin memory. Therefore semiconductors such as p-GaAs were not considered as promising materials for spintronics. In the present work this conclusion is refuted by means of investigation of the spin dynamics of electrons in epitaxial layers of gallium arsenide doped with Mn impurities. In spite of the expectations, we have discovered the suppression of the spin relaxation of electrons in GaAs:Mn by two orders of magnitude. This effect is a consequence of compensation of the hole and manganese effective magnetic fields due to the antiferromagnetic interaction. The analogous results obtained for the case of GaAs quantum well doped with Mn [R. C. Myers, et al., Nature Materials 7, 203 (2008)] were interpreted as the result of the spin precession of magnetic acceptors rather than electrons. Through separate measurements of g-factor by means of time resolved spectroscopy it has been proved that long times of spin relaxation in p-GaAs:Mn relate to electrons and not to magnetic acceptors. The oscillation frequency of the angle of Kerr rotation depends linearly on the magnetic field and complies with g=0.46±0.02, i.e. the electronic g-factor.