A Kubo-Greenwood-like equation for the Gilbert damping parameter α is presented that is based on the linear response formalism. Its implementation on the basis of the fully relativistic Korringa-Kohn-Rostoker (KKR) band structure method together with the Coherent Potential Approximation (CPA) alloy theory allows application to a wide range of situations. This is demonstrated by results obtained for the alloy system bcc FexCo1-x as well as for a series of alloys of permalloy with 5d transition metals. To account for the thermal displacements of atoms as a scattering mechanism, an alloy-analogy model is introduced. In line with experiment, calculations for Ni correctly describe the rapid change of α when small amounts of Cu are introduced substitutionally.