Successful modern generalized gradient approximations (GGAs) are biased toward atomic energies. Restoration of the first-principles gradient expansion for exchange over a wide range of density gradients eliminates this bias. We introduce PBEsol, a revised Perdew-Burke-Ernzerhof GGA that improves equilibrium properties of densely-packed solids and their surfaces.