Observations of the cosmic microwave background (CMB) form the pillar of our current understanding of cosmology. Maps of the temperature and polarization anisotropies of the CMB encode information about the initial conditions of the universe, its matter and energy content, and its evolution over time, setting tight constraints on the parameters of the LCDM cosmological model and probing the physics of inflation. Making these exquisitely precise measurements requires building increasingly sensitive instruments, with larger focal plane areas and ever-greater detector counts. SPT-3G is the latest CMB survey instrument to be installed on the 10-meter South Pole Telescope, utilizing both a larger focal plane and multichroic pixels to raise the detector count to ~16,000, a tenfold increase over its predecessor. SPT-3G will conduct a multi-year survey of a 1500 square-degree patch of sky, producing maps with an unprecedented combination of depth and angular resolution and improving constraints on the CMB power spectrum by over an order of magnitude at small angular scales. In this thesis, I describe the SPT-3G instrument, with special focus on the development and testing of the detectors. I present an analysis of data taken by SPT-3G during the 2018 observing season to produce a measurement of the E-mode polarization power spectrum and temperature-E-mode cross-power spectrum of the CMB over the angular multipole range 300 < l < 3000, and I state the resulting constraints on cosmological parameters.