We develop a quantitative theory of mortality trends and population dynamics. In our theory, individuals incur time and/or goods costs over their life cycle, to adopt a better health technology that increases their age-specific survival probability. Technology adoption is a source of a dynamic externality: As more individuals adopt the better technology, the marginal benefit of future adoption increases. The allocation of time and/or goods also depends on total factor productivity (TFP): As TFP grows, more resources are allocated to technology adoption. Both channels---the dynamic externality and TFP---result in lower mortality. Our theory is consistent with three key facts: (i) The cross-country correlation between mortality and income is negative, (ii) mortality in poor countries has converged to that of rich countries although the income of poor countries has not, and (iii) mortality decline precedes economic take-off. We calibrate the model to match mortality in France from 1816 to 2010. Quantitatively, the model accounts for 54% of the closing of the mortality gap between France and low-income countries over the past 50 years.