Thin films of ZnO and ZnO/carbon nanotubes (CNTs) are prepared and used as CO2 gas sensors. The spray pyrolysis method was used to prepare both ZnO and ZnO/CNTs films, with CNTs first prepared using the chemical vapor deposition method (CVD). The chemical structure and optical analyses for all the prepared nanomaterials were performed using X-ray diffraction (XRD), Fourier transformer infrared spectroscopy (FTIR), and UV/Vis spectrophotometer devices, respectively. According to the XRD analysis, the crystal sizes of ZnO and ZnO/CNTs were approximately 50.4 and 65.2 nm, respectively. CNTs have average inner and outer diameters of about 3 and 13 nm respectively, according to the transmitted electron microscope (TEM), and a wall thickness of about 5 nm. The detection of CO2 is accomplished by passing varying rates of the gas from 30 to 150 sccm over the prepared thin-film electrodes. At 150 sccm, the sensitivities of ZnO and ZnO/CNTs sensors are 6.8% and 22.4%, respectively. The ZnO/CNTs sensor has a very stable sensitivity to CO2 gas for 21 days. Moreover, this sensor has a high selectivity to CO2 in comparison with other gases, in which the ZnO/CNTs sensor has a higher sensitivity to CO2 compared to H2 and C2H2.