Second-half goals from Gareth McAuley and substitute Romelu Lukaku sealed the three points and - following their 3-0 win at The Hawthorns on the opening day of the season - a first double over Reds since the 1966/67 campaign.
Foster saved a spot-kick from Steven Gerrard when the scores were level, after Jonas Olsson was adjudged to have fouled Luis Suarez. The miss proved to be crucial as the Baggies won for the first time in eight games.
"We needed that," Foster told Sky Sports. "We have been on a poor run but the performances have been decent.
"We knew we had a chance if we kept our performances up. We always knew set-pieces would be a big one for us and we managed to get one."
The win takes West Brom above Liverpool and up to eighth in the table with 37 points.
"We have a tough game against Sunderland who themselves are on a decent run, we just have to take it a game at a time," Foster added.
"We got off to a great start to the season and we are within touching distance of 40 (points).
"If you had said at this stage of the season we would be above Liverpool, we would have taken that."