The dielectric response function of an electron gas confined in two dimensions is calculated in the random-phase approximation at any degeneracy. We then focus our attention on the stopping power of such an electron gas. The results exhibit important discrepancies with respect to the three-dimensional case. The leading term of the asymptotic expansion in the high-velocity V range is independent of the electron mass and decreases as 1/V.