The enhancement of Gilbert damping observed for Ni80Fe20 (Py) films in contact with the non-magnetic metals Cu, Pd, Ta and Pt, is quantitatively reproduced using first-principles scattering theory. The "spin-pumping" theory that qualitatively explains its dependence on the Py thickness is generalized to include a number of factors known to be important for spin transport through interfaces. Determining the parameters in this theory from first-principles shows that interface spin-flipping makes an essential contribution to the damping enhancement. Without it, a much shorter spin-flip diffusion length for Pt would be needed than the value we calculate independently.