On 2017 August 17, gravitational waves were detected from a binary neutron star merger, GW170817, along with a coincident short gamma-ray burst, GRB170817A. An optical transient source, Swope Supernova Survey 17a (SSS17a), was subsequently identified as the counterpart of this event. We present ultraviolet, optical and infrared light curves of SSS17a extending from 10.9 hours to 18 days post-merger. We constrain the radioactively-powered transient resulting from the ejection of neutron-rich material. The fast rise of the light curves, subsequent decay, and rapid color evolution are consistent with multiple ejecta components of differing lanthanide abundance. The late-time light curve indicates that SSS17a produced at least ~0.05 solar masses of heavy elements, demonstrating that neutron star mergers play a role in r-process nucleosynthesis in the Universe.