Diffraction happens when light waves bend around an obstacle.
Refraction happens when light waves change direction on moving from one substance into another, e.g. from air into the glass of a lens. Waves of different wavelengths, i.e. different colors, are bent by different amounts. In the case of a gravitational lens, light waves change direction as they pass near the foreground galaxies, because the galaxies' mass bends space nearby. The effect doesn't depend on the light's wavelength. The Hubble Space Telescope is only used to find the lensed object.