Kinetic equation with a self-consistent gravitational field and its application to the theory of relic radiation