We inquire into the physics of a self-gravitating medium which may be far from equilibrium. A unified theory, based on propagators for macroscopic variables, describes both spatial and temporal fluctuations, and the coupling between them. As gravitational interactions become important, fluctuations grow rapidly and become highly correlated with one another. Then an unstable, non-analytic phase transition develops. Rapid expansion does not prevent macrofiuctuations; contraction can enhance them. The dominant length scale contains enough mass to enable the gravitational energy to balance the total kinetic and expansion energies. The time scale is not given directly by the theory but because co-operative effects dominate, it is probably about the time needed for a particle moving with typical random velocity to cross the dominant length scale. This supports the view that non-hydrodynamic fluctuations may develop in most cosmologies after matter and radiation decouple. Their amplitude is sufficient to start the process of condensation which leads, ultimately, to the formation of galaxies and clusters of galaxies.