In this paper, we begin by documenting substantial variation in house price growth across neighborhoods within a city during city wide housing price booms. We then present a model which links house price movements across neighborhoods within a city and the gentrification of those neighborhoods in response to a city wide housing demand shock. A key ingredient in our model is a positive neighborhood externality: individuals like to live next to richer neighbors. This generates an equilibrium where households segregate based upon their income. In response to a city wide demand shock, higher income residents will choose to expand their housing by migrating into the poorer neighborhoods that directly abut the initial richer neighborhoods. The in-migration of the richer residents into these border neighborhoods will bid up prices in those neighborhoods causing the original poorer residents to migrate out. We refer to this process as "endogenous gentrification". Using a variety of data sets and using Bartik variation across cities to identify city level housing demand shocks, we find strong empirical support for the model's predictions.