We demonstrate that the zero-temperature conductance of the Anderson model can be calculated within the Landauer formalism combined with static density-functional theory. The proposed approximate functional is based on finite-temperature density-functional theory and yields the exact Kohn-Sham potential at the particle-hole symmetric point. Furthermore, in the limit of zero temperature it correctly exhibits a derivative discontinuity which is shown to be essential to reproduce the conductance plateau. On the other hand, at the Kondo temperature the exact Kohn-Sham conductance overestimates the real one by an order of magnitude. To understand the failure of density-functional theory, we resort to its time-dependent version and conclude that the suppression of the Kondo resonance must be attributed to dynamical exchange-correlation corrections.