This paper builds a dynamic general equilibrium model of cities and uses it to analyze the role of local housing markets and moving costs in determining the character and extent of labor reallocation in the US economy. Labor reallocation in the model is driven by idiosyncratic city-specific productivity shocks, which we measure using a dataset that we compile using more than 350 U.S. cities for the years 1984 to 2008. Based on this measurement, we find that our model is broadly consistent with the city-level evidence on net and gross population flows, employment, wages and residential investment. We also find that the location-specific nature of housing is more important than moving costs in determining labor reallocation. Absent this quasi-fixity of housing, and under various assumptions governing population flows, population and employment would be much more volatile than observed.