From midfield, Lampard has 203 goals during 12 years with Chelsea — surpassing the record held by Bobby Tambling, the club's striker from 1959 to 1970.
"It means everything, it's amazing," said Lampard, who was out of contract at the end of the season. "The support I've had from teammates, you saw that at the end and I'm thankful to every one of them because they're the ones that put it on a plate for me sometimes.
"And the fans, they've been with me for a long time and were probably frustrated alongside me not getting there so I'm just delighted."
In the only English Premier League game on Saturday, Christian Benteke put Villa ahead in the first half but, with both sides reduced to 10 men, Lampard started Chelsea's comeback in the 61st minute.
The England international curled the ball from inside the area past goalkeeper Brad Guzan to equalize, and then scored the winner from close range in the 88th.
"Bobby Tambling is a great man, he's not been well ... I was pleased to level it but I didn't want to overcook that celebration out of respect for him," Lampard said. "But to then go and break it, I was delighted."
Chelsea's Ramires was sent off before halftime and Benteke was also dismissed in the 58th for receiving a second yellow card.
Chelsea is third in the Premier League with one match remaining, while Villa is five points above the relegation zone.
Villa went in front when Benteke beat Gary Cahill to goalkeeper Brad Guzan's clearance and then peeled off at speed to take Yacouba Sylla's return pass, gliding past Cahill and slipped his shot past goalkeeper Petr Cech at the near post in the 14th minute.
Lampard came close to scoring in the 30th, striking a low free kick that squirmed out of Guzan's hands and rolled gently against a post. Chelsea was starting to find its feet in the game just before a series of refereeing decisions took centre stage.
The first two appeared to be lenient, with Benteke booked rather than sent off for an elbow on Cesar Azpilicueta and Terry also shown a yellow card despite appearing to be the last man when he felled Sylla.
Referee Lee Mason did show a red card just before the interval though, the struggling Ramires earning a second booking for a high challenge on Gabriel Agbonlahor.
Chelsea manager Rafa Benitez reshuffled his lineup at halftime, sending on David Luiz to anchor the midfield and taking off the ineffective Victor Moses.
Villa's extra man lasted only until Benteke was dismissed, again for a second yellow and again for high feet.
Within two minutes the score was level and Lampard was celebrating his long-awaited record-equaling goal. Eden Hazard rolled him the ball from the right flank, he shepherded it into a more central position and then fired home a curling left-footed shot. He was duly mobbed by teammates as he ran to the away support to take in the moment.
The frenetic pace continued, with Chelsea players believing they had gone ahead not long afterward. Former Villa defender Cahill took the ball on the chest before prodding goalward at the back post. Guzan was beaten but Sylla managed to trap it on the line. Ba and Ashley Westwood both moved in, with the latter convincing officials he'd cleared the danger before the ball had crossed the line.
Terry departed on a stretcher after suffering an injury that could jeopardize his hopes of playing in the Europa League final on Wednesday against Benfica.
The winner — Lampard's record-breaker — came from a fine Chelsea move, with Hazard playing a one-two down the left channel before cutting the ball across goal for the midfielder. As so often in his Chelsea career, Lampard was in the right place at the right time and he tapped home with ease. The celebrations which followed were lengthy, with all of Chelsea's players involved.
"It's a fantastic achievement for him to score the number of goals he has," Benitez said. "Hopefully he can score more in the next two games."