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