We present an analytic formalism that describes the evolution of the stellar, gas and metal content of galaxies. It is based on the idea, inspired by hydrodynamic simulations, that galaxies live in a slowly evolving equilibrium between inflow, outflow and star formation. We argue that this formalism broadly captures the behaviour of galaxy properties evolving in simulations. The resulting equilibrium equations for the star formation rate, gas fraction and metallicity depend on three key free parameters that represent ejective feedback, preventive feedback and reaccretion of ejected material. We schematically describe how these parameters are constrained by models and observations. Galaxies perturbed off the equilibrium relations owing to inflow stochasticity tend to be driven back towards equilibrium, such that deviations in star formation rate at a given mass are correlated with gas fraction and anticorrelated with metallicity. After an early gas accumulation epoch, quiescently star-forming galaxies are expected to be in equilibrium over most of cosmic time. The equilibrium model provides a simple intuitive framework for understanding the cosmic evolution of galaxy properties, and centrally features the cycle of baryons between galaxies and surrounding gas as the driver of galaxy growth.