Let $(X,d,\unicode[STIX]{x1D707})$ be a metric measure space endowed with a distance $d$ and a nonnegative, Borel, doubling measure $\unicode[STIX]{x1D707}$. Let $L$ be a nonnegative self-adjoint operator on $L^{2}(X)$. Assume that the (heat) kernel associated to the semigroup $e^{-tL}$ satisfies a Gaussian upper bound. In this paper, we prove that for any $p\in (0,\infty )$ and $w\in A_{\infty }$, the weighted Hardy space $H_{L,S,w}^{p}(X)$ associated with $L$ in terms of the Lusin (area) function and the weighted Hardy space $H_{L,G,w}^{p}(X)$ associated with $L$ in terms of the Littlewood–Paley function coincide and their norms are equivalent. This improves a recent result of Duong et al. [‘A Littlewood–Paley type decomposition and weighted Hardy spaces associated with operators’, J. Geom. Anal.26 (2016), 1617–1646], who proved that $H_{L,S,w}^{p}(X)=H_{L,G,w}^{p}(X)$ for $p\in (0,1]$ and $w\in A_{\infty }$ by imposing an extra assumption of a Moser-type boundedness condition on $L$. Our result is new even in the unweighted setting, that is, when $w\equiv 1$.