The Paris Saint-Germain star, who entered the fray at half-time, provided a moment of star quality after 69 minutes before Roberto Firmino, on his home ground, lobbed home a stoppage-time second.
After a low-key opening in the Liverpool sunshine, Brazil fashioned the first chance when Gabriel Jesus, captaining the side, led a counter-attack that ended when Willian’s flick was scrambled away.
Croatia responded as a Luka Modric corner was headed wide by Liverpool defender Dejan Lovren, and threatened again moments later as Andrej Kramaric, booked for an earlier challenge, forced keeper Alisson into action.
As the half-hour approached, former Anfield favourite Philippe Coutinho fired over and then cut in from the left before sending his attempted shot wildly wide.
Willian saw a deflected cross-shot scrambled clear from close to the line before Paulinho had two efforts in quick succession charged down.
Ivan Perisic was booked for a foul on Jesus and Fernandinho followed him into the book for fouling Sime Vrsaljko, who was able to continue after treatment.
Brazil coach Tite brought on Neymar for Fernandinho at the break as he stepped up his recovery from a foot injury.
The PSG attacker had been sidelined since Feb. 25, when he fractured a metatarsal and sprained his ankle in a Ligue 1 match against Marseille.
As the action resumed, Marcelo flashed a long-range effort wide before Croatia made their first change of the game, Dulje Caleta-Car coming on for Vedran Corluka.
A flurry of further substitutions followed before, with 69 minutes gone, Neymar announced his return in spectacular style, taking possession after build-up play from Willian and Firmino and dancing past three defenders before blasting home.
It was a moment of high quality largely out of keeping with a drab game and lifted Brazil, whose passing found an extra gear in the aftermath.
Rakitic went into the book for a foul on Coutinho as Brazil looked for a second goal — and Firmino found it when he controlled a cross before delicately lifting his finish into the net.