Leaders Corinthians won 1-0 at Figueirense and were preparing to celebrate their fifth national crown when Bernardo scored a last-minute winner at the Engenhao in the Rio derby.
Corinthians have 70 points and Vasco 68 going into next weekend's final round of matches when a draw will be enough for the leaders if the two teams finish equal on points since they have won more matches than their rivals.
Both will play derbies next weekend when Corinthians meet Palmeiras in Sao Paulo and Vasco face arch-rivals Flamengo in Rio without their former Olympique Lyon midfielder Juninho and forward Diego Souza who will be suspended.
"It's going to be a very, very long week. It's tough. It's an historic derby because of the greatness of Corinthians and Palmeiras," Corinthians coach Tite told reporters.
Brazilian-born former Portugal striker Liedson scored the only goal at Figueirense midway through the second half, while all the goals at the Engenhao came in the final quarter of an hour.
Striker Alecsandro came off the bench in the 71st minute and within six minutes he had headed Vasco into the lead from a cross by Felipe Bastos.
Brazil striker Fred scored his eighth goal in three matches for outgoing champions Fluminense who are six points behind Vasco in third.
With their nerves raw, Vasco had Leandro sent off from the bench for protesting and trying to attack the referee before Bernardo's winning goal brought relief and kept their title dream alive.
"I'm so happy to have helped, to have come on... it was a decisive moment and I always dreamt of experiencing a moment like that," said an emotional Bernardo.
Vasco, who won the Copa Brasil this season, are also in the semi-finals of the Copa Sudamericana, the region's second club competition, travelling to face Universidad de Chile on Wednesday in the second leg in Santiago with the tie poised at 1-1.
Fourth-placed Flamengo need a draw against Vasco to secure their place in next year's Copa Libertadores, South America's elite club championship.
After a 1-0 win over Internacional secured with a goal from captain Ronaldinho ended a run of three matches without a win, they are three points ahead of three teams also vying for the fifth Copa Libertadores berth, Coritiba, Inter and Figueirense.
Twice Copa Libertadores winners Cruzeiro were held 2-2 at home by Ceara and remain in danger of relegation.
Cruzeiro are one point above the drop zone, a point ahead of Ceara and two in front of Atletico Paranaense, and next weekend face Belo Horizonte city rivals Atletico Mineiro, who would love to put the last nail in their coffin.
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.