We study theoretically and experimentally transverse and longitudinal electromagnetic waves in n-GaN epitaxial layers. The studies are carried out on the epitaxial layers with various doping levels. Simulation of the reflectivity and absorptivity spectra is performed in a wide frequency range. Additionally, the radiation emission spectra are simulated for various temperatures of the GaN epitaxial layer. It is shown that the resonance peculiarities of the optical spectra are located closely to the frequencies of the coupled plasmon phonon modes. Experimental studies of the reflectivity spectra have been performed in the spectral range 2-20 THz. The experimental spectra are well fitted by the simulated ones and can be used for contactless determination of the electron concentration and mobility in GaN epitaxial layers. The experimental and theoretical results of the present work provide insights for the development of GaN-based devices aimed to absorb/emit terahertz or mid infrared radiation selectively.