An emission spectrum is the opposite of an absorption spectrum. Instead of getting light with a few colors missing, in an emission spectrum those are the only colors we get.
The dark lines correspond to the frequencies of light that have been absorbed by the gas. As the photons of light are absorbed by electrons, the electrons move into higher energy levels. This is the opposite process of emission.
The dark lines, absorption lines, correspond to the frequencies of the emission spectrum of the same element. The amount of energy absorbed by the electron to move into a higher level is the same as the amount of energy released when returning to the original energy level.