The Baggies gloveman made a string of fine saves at Anfield, as well as denying Steven Gerrard's penalty, as his side netted twice late to force their first league victory since Boxing Day.
Foster was delighted to see Albion just a win away from the safety net of 40 points which will be enough to see them clearly avoid any relegation scrap.
"We needed that," Foster told Sky Sports 1. "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.
"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.
"We got off to a great start to the season and we are within touching distance of 40.
"If you had said at this stage of the season we would be above Liverpool, we would have taken that."