An analysis of nuclear properties based on a relativistic energy functional containing Dirac nucleons and classical scalar and vector meson fields is discussed. Density functional theory implies that this energy functional can include many-body effects that go beyond the simple Hartree approximation. Using basic ideas from effective field theory, a systematic truncation scheme is developed for the energy functional, which is based on an expansion in powers of the meson fields and their gradients. The utility of this approach relies on the observation that the large scalar and vector fields in nuclei are small enough compared to the nucleon mass to provide useful expansion parameters, yet large enough that exchange and correlation corrections to the fields can be treated as minor perturbations. Field equations for nuclei and nuclear matter are obtained by extremizing the energy functional with respect to the field variables, and inversion of these field equations allows one to express the unknown coefficients in the energy functional directly in terms of nuclear matter properties near equilibrium. This allows for a systematic * Present address: School of Physics and Astronomy, University of Minnesota, Minneapolis, MN 55455.1 and complete study of the parameter space, so that parameter sets that accurately reproduce nuclear observables can be found, and models that fail to reproduce nuclear properties can be excluded. Chiral models are analyzed by considering specific lagrangians that realize the spontaneously broken chiral symmetry of QCD in different ways and by studying them at the Hartree level. The resulting energy functionals are special cases of the general functional considered earlier. Models that include a light scalar meson playing a dual role as the chiral partner of the pion and the mediator of the intermediate-range nucleon-nucleon interaction, and which include a "Mexican-hat" potential, fail to reproduce basic ground-state properties of nuclei at the Hartree level. In contrast, chiral models with a nonlinear realization of the symmetry are shown to contain the full flexibility inherent in the general energy functional and can therefore successfully describe nuclei.