We derive the Bloch equations for the spin dynamics of a two-dimensional electron gas in the presence of spin-orbit coupling. For the latter we consider both the intrinsic mechanisms of structure inversion asymmetry (Rashba) and bulk inversion asymmetry (Dresselhaus), and the extrinsic ones arising from the scattering from impurities. The derivation is based on the SU(2) gauge-field formulation of the Rashba-Dresselhaus spin-orbit coupling. Our main result is the identification of a spin-generation torque arising from Elliot-Yafet scattering, which opposes a similar term arising from Dyakonov-Perel relaxation. Such a torque, which to the best of our knowledge has gone unnoticed so far, is of basic nature, i.e., should be effective whenever Elliott-Yafet processes are present in a system with intrinsic spin-orbit coupling, irrespective of further specific details. The spin-generation torque contributes to the current-induced spin polarization (CISP), also known as inverse spin-galvanic or Edelstein effect. As a result, the behavior of the CISP turns out to be more complex than one would surmise from consideration of the internal Rashba-Dresselhaus fields alone. In particular, the symmetry of the current-induced spin polarization does not necessarily coincide with that of the internal Rashba-Dresselhaus field, and an out-of-plane component of the CISP is generally predicted, as observed in recent experiments. We also discuss the extension to the three-dimensional electron gas, which may be relevant for the interpretation of experiments in thin films.