Spurs had mounted a spirited comeback after Flamini's close-range strike following a fumble by stand-in goalkeeper Michel Vorm, and equalised at the start of the second half when Callum Chambers deflected the ball into his own net.
However, it was Arsenal - beaten at Chelsea in the Barclays Premier League on Saturday - who finished strongly, with Flamini crashing home a fine 25-yard effort after 78 minutes to send the travelling support into raptures.
Both sides had made the expected changes, Dutchman Vorm replacing Hugo Lloris in the Spurs goal while Costa Rica forward Joel Campbell was handed a rare start in the Gunners' attack.
Arsenal - who had not lost three matches in a row since April 2010 - fashioned the first decent opening in the 13th minute.
Full-back Kieran Gibbs darted down the left and crossed towards Olivier Giroud in the six-yard box, with the ball bobbling up and then Campbell headed it over.
The visitors remained on the offensive and took the lead after 26 minutes.
Midfielder Alex Oxlade-Chamberlain, recalled to the starting XI, cut inside and rifled a low shot goalwards from the edge of the penalty area.
The ball bounced just in front of Vorm, who could only parry his save straight out where Flamini reacted quickly to sweep it back into the roof of the net before celebrating in front of the home support at the North Stand.
Spurs looked for a swift response and felt they should have been awarded a penalty when full-back Danny Rose tumbled over goalkeeper David Ospina, but referee Andre Marriner was not interested.
In first-half stoppage-time, Harry Kane, still searching for a first club goal this season, dragged a shot across the face of goal after a counter-attack.
The Spurs captain thought he had got off the mark soon after the restart when he tapped home a rebound from Christian Eriksen's shot, but was flagged offside.
Tottenham were eventually rewarded for their pressure with an equaliser in the 56th minute.
Nacer Chadli's cross into the six-yard box from the left was deflected past Ospina at his near post by the unfortunate Chambers.
The White Hart Lane faithful were now in full voice as Spurs looked to maintain momentum, before Gibbs headed a goal-bound acrobatic effort from Kane off the line.
Vorm redeemed himself with a smart save at the near post after Giroud was played into the left side of the Spurs penalty area.
Arsenal regained the lead after 78 minutes with a sublime finish from Flamini.
Substitute Alexis Sanchez scampered away down the left and the deflected ball then looped back across field and into the path of Flamini, some 25 yards out.
The midfielder did not break stride as he volleyed a superb effort into the bottom-right corner, before dashing off to celebrate with the jubilant massed ranks of travelling support behind the goal.
After the game, Flamini admitted to having a score to settle, saying on Sky Sports 1: "I'm happy for the team.
"Today was a difficult, tough game. Personally I am happy. Many people were talking about me but the important thing is the three points.
"I had a point to prove, I haven't played for a while. But I'm working hard. Once again, (my) team-mates did a great job. Everyone gave a hundred per cent."
Arsenal boss Arsene Wenger praised his side's response following the Gunners' defeat to Chelsea in the Premier League last time out, as well as the influence of substitute Alexis Sanchez.
"It was a very intense game," he said. "I think we responded well physically and mentally tonight. When you stay with 11 players you can win games.
"He (Sanchez) had straight away an impact. And I think maybe at the same time Tottenham dropped physically as well. The two together gave us space to play."
Tottenham Hotspur: Vorm, Trippier, Fazio, Wimmer, Rose, Dier, Carroll, Townsend, Eriksen, Chadli, Kane. Subs: Lloris, Walker,Vertonghen, Son, N'Jie, Alli, Winks.
COMMENT RULES: Comments that are judged to be defamatory, abusive or in bad taste are not acceptable and contributors who consistently fall below certain criteria will be permanently blacklisted. The moderator will not enter into debate with individual contributors and the moderator’s decision is final. It is Belfast Telegraph policy to close comments on court cases, tribunals and active legal investigations. We may also close comments on articles which are being targeted for abuse. Problems with commenting? email@example.com