In the new period of ups and downs in the international environment, it is necessary to seek a new endogenous impetus for the economic growth of urban agglomerations. Population agglomeration provides a new idea to explain the spatial differences in the economic growth of urban agglomerations. Thus, we ask the question, does population agglomeration affect the spatial differences in the economic growth of urban agglomerations, and how? This study first measured the spatial differences in district- and county-scale economic growth in China’s Guanzhong Plain urban agglomeration from 2005 to 2020 and then constructed an empirical formula to calculate the impact of population density on the urban agglomeration’s economic growth, taking into account the roles of both intra- and inter-district and county interactions. Thus, based on the population density data extracted from nighttime lighting data, we analyzed the impact of population density on economic growth within urban agglomerations, as well as the extent of the impact of population density on economic growth when incorporating spillover effects from neighboring districts and counties. The results indicate that, firstly, the Guanzhong Plain urban agglomeration in China has formed a “core-periphery” development pattern, with the main urban areas of Xi’an–Xianyang and Baoji as the core and the core area gradually spreading out to the neighboring districts and counties of their cities. Secondly, population density can significantly and steadily promote the economic growth of the districts and counties within the urban agglomeration, and the population agglomeration of districts and counties with railway stations can have a stronger effect on the economic growth of these districts and counties. Third, the agglomeration of economic and demographic factors in neighboring counties has a positive spillover effect on the local economy, while the positive impact of population density on economic growth remains unchanged when it is integrated into the spillover effect of neighboring counties. This study not only provides a theoretical basis for systematically exploring the influence of population density on the economic growth of urban agglomerations but also provides a reference for local governments to formulate policies related to regional economic development and spatial territorial planning. According to the research conclusion, this study suggests that local governments can continue to promote the regional development policy of spatial agglomeration and intensive land planning, strengthen the construction of the industrial chain and road network within the urban agglomeration, and deepen the network connection between districts and counties.