At first, referee Bjorn Kuipers gave the spot-kick but the incident was looked at again by VAR and, though Gonzalez did grab at Neymar's jersey as he slipped, the contact appeared minimal prior to the world's most expensive footballer hitting the deck.
Brazil has four points in the Group E standings and is tied with Switzerland for first, putting the five-time tournament champion in good position to advance to the round of 16.
The five-time winners and the competition's most decorated nation were on course for their second successive draw in Russian Federation, with Neymar denied a second-half penalty upon VAR review and Gabriel Jesus hitting the crossbar.
Neymar dropped to his knees after the final whistle, sobbing in his hands as his teammates surrounded him and then lifted him off the ground.
On Friday evening, it was Coutinho who scored the opening goal for Brazil in the 91st minute. "Goodbye to the World Cup!" read the headline of La Nacion, a daily newspaper.
Switzerland's equaliser was only the sixth goal Brazil conceded in 22 games under Tite, while Neymar struggled to perform at his best.
Pets Zsa Zsa the Bulldog Is Named the World's Ugliest Dog
Most of the World's Ugliest Dog contestants are up for adoption and the event helps raise awareness of pet rescue and adoption. The dogs strutted their stuff for a panel of judges who selected the very finest specimen from the monstrous mutts.
Costa Rica's hopes of repeating the heroics of their 2014 run to the quarter-finals are over following two defeats out of two.
This was just his fourth appearance since breaking a bone in his foot against Marseille in February and only the second time he has completed the full 90 minutes.
After a much of frustration, Costa Ricans finally conceded twice in stoppage time and slumped to a second loss that ended their chances of advancing to the knockout stage. But I think I was right, because they were trying to save time. Though the Costa Rica team defended well but were of no challenge to Brazil whatsoever. He set up the second goal for Neymar.
Brazil named Paris Saint-Germain defender Thiago Silva as captain for the match in a continuation of their long-standing policy of rotating the team leadership. Serbia will face Brazil in Moscow at the same time. The penalty was awarded after a video review showed that Alfred Finnbogason had been brought down by Tyronne Ebuehi.
Firmino also played a vital role in Brazil's victory as his presence added a scoring threat and his positioning allowed him to head the ball towards Coutinho to score the game's first goal.