This research paper presents a detailed study of the influence of annealing temperature and UV irradiation on the sensitivity to NO2 of HfO2 thin films that can be used for the development of metal-oxide gas sensors. The HfO2 thin films were grown with a 3.3-nm thickness by using atomic layer deposition (ALD) and were annealed at different temperatures. The HfO2 thin films were characterized by using an atomic force microscope (AFM). The roughnesses of thin films were seen to have been affected by the annealing treatment. The effects of annealing temperature, as well as the operating temperature, on the response and the recovery characteristics of the HfO2 film were investigated. The results showed that both the annealing temperature and the operating temperature had significant effects on the sensing characteristics. Also, at room-temperature operation, the sensitivity of HfO2 thin films to 5 ppm of NO2 gas in air was investigated under UV irradiation. UV irradiation not only increased the response but also reduced the response and the recovery times during the gas-sensing measurements.