We develop the principles of construction of a gas spectrometer based on nonstationary effects (freely decaying polarization, fast sweep, etc.) with the use of solid-state devices in the terahertz frequency band. A spectrometer based on quantum semiconductor superlattices (QSSLs), which is operated at up to 2.5 THz and meets the requirements of high and ultra-high resolution spectroscopy is implemented. As the radiation source in this spectrometer, we use a frequency synthesizer which was developed by the authors of this paper. The device is based on a phase-shift keyed Gunn oscillator and a QSSL frequency multiplier. As the receiving system, a QSSL mixer operated in harmonic mode was employed. The possibilities of harmonic generation by using the radiation of a spectrally pure Gunn oscillator and a QSSL frequency multiplier are studied with the help of the IR Fourier spectrometer “BOMEM” DA3.002 with Si-composite bolometer operated at a temperature of 4.2 K. The 45th harmonic at a frequency of about 6.5 THz was reached in the experiment. The spectral absorption lines of NH3 and CO at 2400017.632 and 1841345.506 MHz, respectively, were measured.