On 2017 August 17, the Laser Interferometer Gravitational-wave Observatory (LIGO) and the Virgo interferometer detected gravitational waves emanating from a binary neutron star merger, GW170817. Nearly simultaneously, the Fermi and INTEGRAL telescopes detected a gamma-ray transient, GRB 170817A. 10.9 hours after the gravitational wave trigger, we discovered a transient and fading optical source, Swope Supernova Survey 2017a (SSS17a), coincident with GW170817. SSS17a is located in NGC 4993, an S0 galaxy at a distance of 40 megaparsecs. The precise location of GW170817 provides an opportunity to probe the nature of these cataclysmic events by combining electromagnetic and gravitational-wave observations.