Cole came off the bench to equalise for the visitors against his old club before an own goal from James Collins secured the Reds all three points.
The former Hammer admitted that his first Premier League goal of the season meant more because it helped Liverpool get a vital win.
He told Sky Sports News: "It's an important win for us because West Ham were only three points above us.
"It's always nice to come back to your old club and it was a good win for us. I've scored a few goals against West Ham and I've never celebrated.
"But the most important thing was getting the win."