We examine impacts of market integration on the development of American manufacturing, as railroads expanded through the latter half of the 19th century. Using new county-by-industry data from the Census of Manufactures, we estimate substantial impacts on manufacturing productivity from relative increases in county market access as railroads expanded. In particular, the railroads increased economic activity in marginally productive counties. Allowing for the presence of factor misallocation generates much larger aggregate economic gains from the railroads than previous estimates. Our estimates highlight how broadly-used infrastructure or technologies can have much larger economic impacts when there are inefficiencies in the economy.