Champions Boca, who conceded their first goals in the championship, had looked set to claim the three points having come back from two goals down after seven minutes and 3-1 behind near the end of the first half to lead 4-3 with one minute to go.
But Farias struck twice in the final stages to seal the unlikely victory for the visitors, their first points after four opening defeats.
It was not enough to lift Independiente off the bottom of the table but brought some welcome cheer after coach Ramon Diaz resigned following last weekend's home defeat by Argentinos Juniors with Cristian Diaz taking over as caretaker.
"You've always got to want it right up to the end. The team have come away with victory we always sought," Farias told broadcasters Futbol Para Todos after the 'clasico' between two of Argentina's traditional Big Five clubs.
Boca, slumping to their second consecutive home defeat after they lost 2-1 to Brazil's Fluminense in the Libertadores Cup on Wednesday, slipped off the top of the standings with Tigre taking over on 13 points from five matches after a 2-0 win at Banfield.
Independiente shocked Boca by going in front after only 40 seconds with a goal by midfielder Patricio Vidal and in the seventh minute defender Osmar Ferreyra curled a free-kick past goalkeeper Agustin Orion to put them two up.
Facundo Roncaglia pulled one back in the 13th minute when he headed home a cross to the far post from fellow defender Rolando Schiavi.
With playmaker Juan Roman Riquelme trying to get a grip on midfield and dictate Boca's fightback, Independiente restored their two-goal advantage just past the half-hour with Farias's diving header.
Boca kept in touch, though, as Riquelme pulled a cross down in first half stoppage-time and shot with the ball going in off Ferreyra's outstretched leg.
The champions equalised six minutes into the second half with Roncaglia's second goal after a blunder by Independiente's young goalkeeper Diego Rodriguez and they went ahead after midfielder Pablo Ledesma's headed home in the 75th.
Former River Plate and Porto striker Farias, saving his best for last, equalised when his header found the net at the far post when defender Eduardo Tuzzio sent in a tight cross from the right in the 90th minute.
In the fourth minute of added-time, Farias chased a long clearance, slipped past Schiavi and chipped Orion from just inside the box to stun a packed Bombonera as Boca's unbeaten league run ended at 33 matches.
Boca will be licking their wounds as they prepare to face fellow Argentine side Arsenal in a key Libertadores Cup match on Wednesday having taken only one point from a possible six in Group Four.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.