As you know, gain in a laser requires population inversion. The gain curve represents the band of transitions in the medium which are in a state of population inversion. For example, if you have a solid state medium such as GaAs, you have a valence band as well as an excited-state band, with a band gap in between. If electrons are efficiently pumped from one band to the other, there might be a population inversion condition over a range of energies determined by the details of the band structure and pumping conditions. Many transitions could be stimulated by light in the medium, thus the gain curve has some bandwidth. This is in contrast to a gas laser or the typical 3- or 4-level system models, for which the gain occurs only at discrete energies. But as I mentioned, only some bands of transitions will be population-inverted, based on the band diagram and pumping strength. For example, typically the lower-energy limit of the gain curve corresponds to the band gap in the material.
Okay, so what are the narrow lines in that plot? Those are the modes of the laser cavity. Only the modes which line up with the gain curve will experience gain. Furthermore, only the modes which experience enough gain to overcome the cavity losses will ultimately surpass threshold.