The Liverpool forward came on after 68 minutes of play in the World Cup finals group-stage encounter, with the scoreline locked at 0-0.
Brazil clinched three crucial points, however, with two stoppage-time strikes – and Firmino was crucial in the opener, nodding a ball down for Gabriel Jesus to touch onto ex-Red Philippe Coutinho to score.
Neymar made sure of the win when he struck in the 97th minute.