Such urban neighborhoods appeal to money-strapped younger people as well as empty-nesters who enjoy city life and don’t want to depend on a car. And dense neighborhoods work for low-income earners if jobs are accessible by mass transit. The growing market for such neighborhoods—the classic gentrification magnet—is colliding with the reality that there are not enough of them in cities around the country.