The church stands on the site of a former city gate, which, before being walled over in 1327, entered the city at the borough of San Pietro. The former entrance enjoyed the protection of a statue of the Madonna renowned for its miraculous powers during plague epidemics. In 1520, a chapel was built around it, marking the foundation of the Confraternity known as the Beata Vergine del Soccorso. The chapel was enlarged on a design by D. Tibaldi in 1581 thanks to donations of the Confraternity faithful. Destroyed in an air raid in 1944, it was rebuilt by architect L. Vignali.