We report the discovery of a multiply imaged, gravitationally lensed type Ia supernova, iPTF16geu (SN 2016geu), at redshift z = 0.409. This phenomenon was identified because the light from the stellar explosion was magnified more than 50 times by the curvature of space around matter in an intervening galaxy. We used high-spatial-resolution observations to resolve four images of the lensed supernova, approximately 0.3 arc seconds from the center of the foreground galaxy. The observations probe a physical scale of ~1 kiloparsec, smaller than is typical in other studies of extragalactic gravitational lensing. The large magnification and symmetric image configuration imply close alignment between the lines of sight to the supernova and to the lens. The relative magnifications of the four images provide evidence for substructures in the lensing galaxy.