We investigate hcp Gd and the Gd(0001) surface on the basis of
density functional theory. The localized 4f states of Gd,
which represent a challenge for first-principles theory, are
treated in four different models, employing consistently the
full-potential linearized augmented plane-wave method.
Our results support previous findings that within the local
density approximation (LDA) or generalized
gradient approximation (GGA) the
itinerancy of the 4f states is overestimated. In particular,
the large density of states at the Fermi energy due to the
minority 4f electrons is unphysical, and our results show that
this is the origin of the incorrect prediction of the
antiferromagnetic ground state for hcp Gd by many LDA and GGA
calculations. We show that different models of removing these
states from the region close to the Fermi energy, for example the
treatment of the 4f electrons as localized core electrons or
by using the LDA + U formalism, lead to the prediction of the
correct ferromagnetic ground state for the bulk and a
ferromagnetically coupled (0001) surface layer. With these
models ground-state properties such as the magnetic moment and
structural parameters can be determined in good agreement with
experiment. The energetic positions of the surface states of the
Gd(0001) surface are compared with experimental data.