We present cosmological constraints from the sample of Type Ia supernovae (SN Ia) discovered during the full five years of the Dark Energy Survey (DES) Supernova Program. In contrast to most previous cosmological samples, in which SN are classified based on their spectra, we classify the DES SNe using a machine learning algorithm applied to their light curves in four photometric bands. We find 1635 DES SN in the redshift range 0.10<z<1.13 to constrain cosmological parameters, resulting in the tightest cosmological constraints achieved by any SN data set to date. Using SN data alone and including systematic uncertainties we find ΩM=0.352±0.017 in a flat ΛCDM model, and (ΩM,w)=(0.264+0.074−0.096,−0.80+0.14−0.16) in a flat wCDM model.