H2S gas sensors with facile preparation, low detection limits, and high selectivity are crucial for environmental and human health monitoring. However, it is difficult to maintain a high response of H2S gas sensors under high humidity in practical applications. To face this dilemma, a layer-by-layer growth method is applied to in situ prepare a nanostructured Co(CO3)0.5(OH)·0.11H2O/WO3 coated by a hydrophobic hierarchical ZIF-67 as the H2S sensor. This novel composite exhibits excellent humidity immunity without sacrificing the excellent sensitivity and selectivity of H2S. At a low operating temperature of 90°C, a remarkable response value of 1052.3 to 100ppm H2S has been achieved, which is 779 and 9.36 times higher than that of pure WO3 and Co(CO3)0.5(OH)·0.11H2O/WO3, respectively. More importantly, an 82.2% relative response value remains at a high humidity of 75%RH. The sensing mechanisms are investigated using gas chromatography-mass spectrometry (GC-MS), which revealed that the reaction products are H2O and SO2. The high humidity immunity and fast response of the Co(CO3)0.5(OH)·0.11H2O@ZIF-67/WO3 demonstrate the layer-by-layer in situ synthesis method holds the potential application for the development of high-performance WO3-based H2S sensors.