The Reds took the lead through Luis Suarez's 29th goal of the season at Anfield but found themselves having to come from behind after two Jan Vertonghen goals.
Stewart Downing capitalised on Kyle Walker's erroneous backpass to equalise before Gerrard stroked home a penalty after Suarez was fouled by Benoit Assou-Ekotto.
It was the first time the Reds had beaten a top-five team and it lifted Brendan Rodgers' side within two points of sixth-placed Arsenal, who have a match in hand, and seven adrift of Champions League qualification.
"It's a big win for us," Gerrard said. "With our performances against the top sides this season I think we've been very unlucky not to get a win.
"It's been too long so there's a bit of relief really that we have proved we can beat one of the top sides in the league.
"I think on current form, along with ourselves, Tottenham (whose 12-match unbeaten league record was ended) are probably the best team in the league.
"They are a fantastic team but we always stayed in the game. Even at 2-1, with players like Luis Suarez and Daniel Sturridge in your team you always know that something can happen to get you back in it.
"When we went out of the Europa League the message from the manager and the staff was that we needed to try to win as many of our remaining games as possible and try to finish as high as possible.
"Our form is good but we can't afford to get carried away just because we've beaten Tottenham. We need to show what we've shown in all of our remaining games. We want to finish above Everton and as high as we can in the league."