We report measurements of the superconducting gaps and the electron-phonon coupling in untwinned YBa2Cu4O8 (Y 1:2:4) single crystals by electronic and phononic Raman scattering. For xx- and, to a lesser extent, also for yy-polarized light, a scattering continuum that decreases in the superconducting state below 325 cm-1 (thus signaling a gap 2-DELTA-2 such that 2-DELTA-2/kT(c) almost-equal-to 6.5) is observed. We measure, in yy polarization only, another sharp decrease of the electronic scattering below 113 cm-1, indicating a second gap 2-DELTA-1, such that 2-DELTA-1/kT(c) almost-equal-to 2.3. The existence and the size of both gaps are confirmed by the observation of phonon anomalies at T(c) for nearly all A(g) phonons. We conjecture that the smaller gap DELTA-1 occurs at the chain bands and probably also exists in YBa2Cu3O7-delta (Y 1:2:3) but cannot be observed by Raman scattering. The larger gap DELTA-2 corresponds to the plane bands. 2-DELTA-2 seems to be approximately the same as in Y 1:2:3 although T(c) is 20% lower. Since, at low temperature, the electronic scattering intensity increases continuously from, at least, 35 cm-1 to 2-DELTA-1, or 2-DELTA-2, respectively, we suggest that both gap functions are anisotropic in k space. We draw three conclusions: First, for studies of superconducting Y 1:2:3 and Y 1:2:4, a gap in the chain-band Fermi surfaces must be taken into account. Second, values of 2-DELTA/kT(c), higher than the BCS value of 3.5 could be the result of gap anisotropy or multiple gaps rather than strong coupling. Third, the electron-phonon coupling observed by phonon anomalies at T(c) is by no means specific of vibrations of the CuO2 plane oxygens; on the contrary, the effects of the Ba and chain copper A(g) phonons are stronger in Y 1:2:4. We also demonstrate that the Raman scattering amplitude for the chain copper phonon has a different sign for xx and yy scattering, since the Fano line-shape coefficient q has the opposite sign in both cases. Finally, we show that the electronic Raman scattering intensity increases at the longer laser wavelengths, and we demonstrate that the opening of the superconducting gaps can be directly observed in resonant Raman scattering as enhancements in the Raman efficiencies below T(c). We suggest an explanation for the unexpected dependence of the phonon intensities on temperature observed in the normal state based on a resonance between the phonon energies and the energy separation between the two chain bands.