In many engineering projects, it is critical to consider the acid erosion of rock. This study investigates dynamic changes in pore structure and damage mechanisms in sandstones subjected to acid erosion. Specimens with three grain sizes were immersed in acid solution and tested by the nuclear magnetic resonance technique. Changes in solution pH, specimen mass and porosity, T2 spectrum distribution, and area were analyzed. Damage mechanisms are discussed, and relationships between porosity and acid erosion damage variables are established. The results show that acid erosion has significant effects on pore structure and erosion damage in sandstone. With increasing soaking time, new micropores formed in sandstone, while existing micropores and mesopores gradually expanded into macropores, causing the T2 spectrum distributions to change greatly. The porosity, acid erosion damage, and T2 spectral areas of sandstones with different grain sizes all increased gradually. Under acid erosion, sandstones became gradually weakened, but the effects varied greatly according to grain size. Pore structure changes and acid erosion damage were greatest in coarse-grained sandstone, followed by medium- and fine-grained sandstone.