We present UV, optical, and near-infrared (NIR) photometry of the first electromagnetic counterpart to a gravitational wave source from Advanced Laser Interferometer Gravitational-wave Observatory (LIGO)/Virgo, the binary neutron star merger GW170817. Our data set extends from the discovery of the optical counterpart at 0.47–18.5 days post-merger, and includes observations with the Dark Energy Camera (DECam), Gemini-South/FLAMINGOS-2 (GS/F2), and the Hubble Space Telescope (HST). The spectral energy distribution (SED) inferred from this photometry at 0.6 days is well described by a blackbody model with T ≈ 8300 K, a radius of R ≈ 4.5 x 1014 cm (corresponding to an expansion velocity of v ≈ 0.3c), and a bolometric luminosity of Lbol ≈ 5 x 1041 erg s−1. At 1.5 days we find a multi-component SED across the optical and NIR, and subsequently we observe rapid fading in the UV and blue optical bands and significant reddening of the optical/NIR colors. Modeling the entire data set, we find that models with heating from radioactive decay of 56Ni, or those with only a single component of opacity from r-process elements, fail to capture the rapid optical decline and red optical/NIR colors. Instead, models with two components consistent with lanthanide-poor and lanthanide-rich ejecta provide a good fit to the data; the resulting "blue" component has M ej blue ≈ 0.01M⊙ and v ej blue ≈ 0.3 c, and the "red" component has M ej red ≈ 0.04 M⊙ and v ej red ≈ 0.1 c. These ejecta masses are broadly consistent with the estimated r-process production rate required to explain the Milky Way r-process abundances, providing the first evidence that binary neutron star (BNS) mergers can be a dominant site of r-process enrichment.