The relation between semiclassical and density-functional approximations is clarified. Semiclassical approximations both explain and improve upon density-gradient expansions for finite systems. We derive highly accurate density and kinetic energy functionals of the potential in one dimension.