We study the dispersion of the extraordinary dielectric function real and imaginary parts in the wide terahertz-frequency range of the lowest polariton branch for bulk LiNbO3 and Mg:LiNbO3 crystals. At frequencies 0.1–2.5 THz, both dispersion parts are measured by means of standard time-domain terahertz spectroscopy, and at higher frequencies up to 5.5 THz, the dielectric function real part is determined using a common scheme of spontaneous parametric down-conversion under near-forward Raman scattering by phonon polaritons. A special approach is applied for measuring of the dielectric function imaginary part at frequencies 1–3 THz, based on the analysis of visibility of three-wave second-order interference under spontaneous parametric down-conversion. The generalized approximate expressions are obtained for complex dielectric function dispersion within the lower polariton branches of LiNbO3 and Mg:LiNbO3. It is shown that the well-known decrease in terahertz-wave absorption of lithium niobate crystals under Mg-doping is caused by changes in the defect structure and reduction of coupling of the terahertz-frequency polaritons with Debye relaxational mode.