Robinho netted a header in the second half to seal victory in Toronto after Eduardo Vargas had struck for Chile to cancel out Hulk's opener.
Having beaten Honduras 5-0 last weekend, the 2014 World Cup hosts had to work hard to beat a Chilean side buoyed by their win over England in a fascinating game at the Rogers Center.
The start could not have gone much worse for Chile as they lost defender Marcelo Diaz to a rib injury early on, then found themselves 1-0 down soon after.
Marcos Gonzalez missed a defensive pass and Oscar picked up the loose ball before finding Hulk, who beat keeper Claudio Bravo with a left-footed strike.
Chile continued to look uncertain until coach Jorge Sampaoli made his second substitution, introducing experienced playmaker Jorge Valdivia for Jose Pedro Fuenzalida at the 22nd minute.
From then on they were able to test Brazil keeper Julio Cesar.
Chile clinched the equaliser in the 71st minute when Jean Beausejour headed the ball on to Vargas, who beat Julio Cesar with an astonishing right-foot shot to the near post.
But Robinho, on as a second-half replacement for former Manchester City team-mate Jo, popped up minutes later to give Brazil the win in a move started by Neymar.
The Barcelona forward passed the ball to Maicon, who crossed for Robinho to nod the ball home, giving the five-time world champions the decisive lead with 11 minutes to play.