Two of the most sensitive probes of the large scale structure of the universe are the clustering of galaxies and the tangential shear of background galaxy shapes produced by those foreground galaxies, so-called galaxy-galaxy lensing. Combining the measurements of these two two-point functions leads to cosmological constraints that are independent of the galaxy bias factor. The optimal choice of foreground, or lens, galaxies is governed by the joint, but conflicting requirements to obtain accurate redshift information and large statistics. We present cosmological results from the full 5000 sq. deg. of the Dark Energy Survey first three years of observations (Y3) combining those two-point functions, using for the first time a magnitude-limited lens sample (MagLim) of 11 million galaxies especially selected to optimize such combination, and 100 million background shapes. We consider two cosmological models, flat $Lambda$CDM and $w$CDM. In $Lambda$CDM we obtain for the matter density $Omega_m = 0.320^{+0.041}_{-0.034}$ and for the clustering amplitude $S_8 = 0.778^{+0.037}_{-0.031}$, at 68% C.L. The latter is only 1$sigma$ smaller than the prediction in this model informed by measurements of the cosmic microwave background by the Planck satellite. In $w$CDM we find $Omega_m = 0.32^{+0.044}_{-0.046}$, $S_8=0.777^{+0.049}_{-0.051}$, and dark energy equation of state $w=-1.031^{+0.218}_{-0.379}$. We find that including smaller scales while marginalizing over non-linear galaxy bias improves the constraining power in the $Omega_m-S_8$ plane by $31%$ and in the $Omega_m-w$ plane by $41%$ while yielding consistent cosmological parameters from those in the linear bias case. These results are combined with those from cosmic shear in a companion paper to present full DES-Y3 constraints from the three two-point functions (3x2pt).