The second data release (DR2) from the European Space Agency mission Gaia took place on April 2018. DR2 included photometry for more than 1.3x10^9^ sources in the three bands G, G_BP_, and G_RP_. Even though the Gaia DR2 photometry is very precise, there are currently three alternative definitions of the sensitivity curves that show significative differences. The aim of this paper is to improve the quality of the input calibration data to produce new compatible definitions of the G, G_BP_, and G_RP_ bands and to identify the reasons for the discrepancies between previous definitions. We have searched the Hubble Space Telescope (HST) archive for Space Telescope Imaging Spectrograph (STIS) spectra with G430L+G750L data obtained with wide apertures and combined them with the CALSPEC library to produce a high quality spectral energy distribution (SED) library of 122 stars with a broad range of colors, including three very red stars. This library defines new sensitivity curves for G, G_BP_, and G_RP_ using a functional analytical formalism. The new sensitivity curves are significantly better than the two previous attempts we use as a reference, REV (Evans et al., 2018A&A...616A...4E, Cat. I/345) and WEI (Weiler, 2018A&A...617A.138W, Cat. J/A+A/617/A138). For G we confirm the existence of a systematic bias in magnitude and correct a color term present in REV. For G_BP_ we confirm the need to define two magnitude ranges with different sensitivity curves and measure the cut between them at G_phot_=10.87mag with a significant increase in precision. The new curves also fit the data better than either REV or WEI. For G_RP_, our new sensitivity curve fits the STIS spectra better and the differences with previous attempts reside in a systematic effect between ground-based and HST spectral libraries. Additional evidence from color-color diagrams indicate that the new sensitivity curve is more accurate. Nevertheless, there is still room for improvement in the accuracy of the sensitivity curves because of the current dearth of good-quality red calibrators: adding more to the sample should be a priority before Gaia data release 3 takes place.