The Selecao had seen off every opponent without conceding a goal on the back of their disappointing World Cup quarter-final exit last summer, but both of those records ended in Porto.
Brazil twice hit the frame of the goal but could not find a way through in the remainder of the match, leaving Tite with work to do as the days tick down to his side's Copa opener against Bolivia on home soil.
Brazil started the brighter of the two sides but struggled to create clear-cut chances.
It took until 21 minutes into the game before Roberto Firmino outjumped his opponent for the first opportunity at either end, which he headed over the crossbar.
Arthur fired wide from the edge of the box twice in the space of two minutes as the Selecao started to turn the screw, and Tite's men had a penalty appeal rejected moments later when Firmino was dragged down by Harold Cummings.
Panama, who themselves has a pen shout rejected for a handball against Eder Militao, held off their opponents for half an hour but the breakthrough arrived via the boot of Paqueta.
Casemiro swept a first-time ball towards the back post and Paqueta fired it back across goal into the back of the net, though Panama keeper Luis Mejia got something to it and will perhaps feel that he should have kept the shot out.
Panama responded well, however, and they were level less than five minutes later through captain Machado's powerful and precise header, getting on the end of Eric Davis's deep delivery to end Brazil's impressive defensive run without conceding.
Richarlison headed wide at the back post from the first half's only other real opportunity, but Brazil were grateful to Ederson for keeping them level early in the second half as Jose Luis Rodriguez's belter was heading for the corner.
Despite Panama getting bodies back behind the ball, Brazil were able to create the odd opportunity as Richarlison thumped the crossbar with his first-time shot and Paqueta shot straight at Mejia following a superb pass from Firmino.
Casemiro then powered a header against the crossbar with 20 minutes remaining, which Richarlison could not quite turn home from the rebound, and the Real Madrid midfielder was also denied by a diving Mejia from a long-range free kick.
The pressure on the Panama goal continued to build as Richarlison was the latest to be thwarted by Mejia, while Militao sent a header wide in added time after initially doing well to get on the end of the corner.
There was almost a dramatic twist with 30 seconds of the five added-on minutes left, but Jose Fajardo Nelson picked out the side-netting when teed up by debutant Cesar Blackman, much to the relief of Ederson.
BRAZIL (4-3-3): Ederson; Fagner, Militao, Miranda, Telles; Arthur (Anderson 72'), Casemiro, Paqueta (Everton 60'); Coutinho, Firmino (Jesus 60'), Richarlison
PANAMA (5-4-1): Mejia; Murillo (Blackman 85'), Machado, Cummings, Escobar, Davies; Quintero (Browne 85'), Cooper (Walker 82'), Godoy (Vargas 92'), Luis Rodriguez (Arroyo 89'); Torres (Nelson 72')