This is an instance of Watson's quintuple product identity (also Macdonald identity for $BC_1$): $$\prod_{n\geq 1}(1-s^n)(1-s^nt)(1-s^{n-1}t^{-1})(1-s^{2n-1}t^2)(1-s^{2n-1}t^{-2})=\sum_{n\in \mathbb Z}s^{\frac{3n^2+n}{2}}(t^{3n}-t^{-3n-1}).$$ By plugging in $t=x^{-1}$ and $s=-x^{4}$ this becomes exactly your identity.
Somewhat amusingly, the quintuple product identity can be proven directly from the triple product identity. See this article by Carlitz, or this article of Foata and Han.