An accurate ab initio theory of the H-bond structure of liquid water requires a high-level exchange correlation approximation from density functional theory. Based on the liquid structures modeled by ab initio molecular dynamics by using maximally localized Wannier functions as a basis, we study the infrared spectrum of water within the canonical ensemble. In particular, we employ both the Perdew-Burke-Ernzerhof (PBE) functional within the generalized gradient approximation (GGA) and the state-of-the-art meta-GGA level approximation provided by the strongly constrained and appropriately normed (SCAN) functional. We demonstrate that the SCAN functional improves not only the water structure but also the theoretical infrared spectrum of water. Our analyses show that the improvement in the stretching and bending bands can be mainly attributed to better descriptions of directional H bonding and the covalency at the inter- and intramolecular levels, respectively. On the other hand, better agreements in libration and hindered translation bands are due to the improved dynamics of the H-bond network enabled by a less structured liquid in the experimental direction. The spectrum predicted by SCAN shows much better agreement with experimental data than the conventionally widely adopted PBE functional at the GGA level.