We present UV, optical, and NIR photometry of the first electromagnetic counterpart to a gravitational wave source from Advanced LIGO/Virgo, the binary neutron star merger GW170817. Our data set extends from the discovery of the optical counterpart at $0.47$ days to $18.5$ days post-merger, and includes observations with the Dark Energy Camera (DECam), Gemini-South/FLAMINGOS-2 (GS/F2), and the {it Hubble Space Telescope} ({it HST}). The spectral energy distribution (SED) inferred from this photometry at $0.6$ days is well described by a blackbody model with $Tapprox 8300$ K, a radius of $Rapprox 4.5times 10^{14}$ cm (corresponding to an expansion velocity of $vapprox 0.3c$), and a bolometric luminosity of $L_{rm bol}approx 5times10^{41}$ 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 $^{56}$Ni, 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_mathrm{ej}^mathrm{blue}approx 0.01$ M$_odot$ and $v_mathrm{ej}^mathrm{blue}approx 0.3$c, and the red component has $M_mathrm{ej}^mathrm{red}approx 0.04$ M$_odot$ and $v_mathrm{ej}^mathrm{red}approx 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 BNS mergers can be a dominant site of $r$-process enrichment.