We explored the in situ and real-time monitoring of the electric dipolar relaxation during the interaction of ammonia (NH3) gas, a crucial phenomenon in the gas sensing mechanism of conducting polymers, with dodecyl-benzene-sulfonic acid (DBSA)-doped polyaniline (PANI) nanocomposite polymer thin films. Dielectric spectroscopy from 20 Hz to 100 MHz was performed to analyze the dynamical behavior of the interaction process of DBSA-doped PANI nanocomposite polymer thin film with NH3 molecules. Initially, with no NH3 gas, the dielectric measurement showed a negative relative dielectric constant (about -6500 at 20 Hz) at low frequencies, indicating the conducting nature of unadorned DBSA-doped PANI nano-composite thin film (PANI-DBSA). On exposing PANI-DBSA film to NH3, the low frequency dipolar relaxation process was observed in the dielectric spectra. A shift toward the high frequency as a function of NH3 exposure time was observed, elucidating a continuous increase in dielectric strength and density of dipoles in the composite film with increasing exposure time which allows the gas a deeper penetration into the film and hence the increase in the density of dipoles. Removal of NH3 gas from PANI-DBSA allowed the system to retain its previous state,which is significant for sensing applications.