The midfield star converted from 12 yards to level after Dario Cvitanich's spot kick had given the hosts a shock lead
New arrivals Jeremy Mathieu and Ivan Rakitic made their first appearances for Barca, together with Rafinha, who has returned from a loan spell with Celta Vigo.
In his side's first friendly since a youthful Barca XI beat Recreativo Huelva 1-0 last month, Luis Enrique fielded a strong lineup.
Yet Dario Cvitanich put the Ligue 1 outfit ahead after 21 minutes with a well-taken penalty after being brought down by Gerard Pique in the area.
Having been put under pressure for much of the game, things began to unravel for Nice after the break as it lost goalkeeper Mouez Hassen prior to Xavi equalizing from the penalty spot following a foul on Munir El Haddadi.
The scoring stopped there, and Luis Enrique will likely be looking for an improved showing when Barca meets Napoli on Wednesday.
One of Mathieu's first involvements was conceding a free kick outside the area, with Eric Bautheac's subsequent curled effort forcing Marc-Andre ter Stegen into a smart stop down to his left.
With the game played at typical close-season pace, the crowd in southern France had to wait until the 19th minute for the next incident of note when Cvitanich was bundled over in the area by Pique.
The Argentine striker stepped up to slot the resulting spot kick past Ter Stegen and open the scoring.
Pedro then came close to forging an opening but failed to control a deft lob from Jordi Alba when through on goal.
Andres Iniesta almost saw his free kick deceive Hassen in the Nice goal via a deflection off Jeremy Pied as Barca began to crank up the pressure, Alba clipping the crossbar with an attempted cross soon after.
Just as the visitors were getting on top, they saw defender Martin Montoya limp off - young defender Patric replacing him shortly before the break.
Rakitic came into the fray for the second half and fellow substitute El Haddadi almost made Pied pay for a sloppy back pass shortly after, only to be denied by Hassen.
Pied almost made amends when he angled an effort marginally wide before Nice, already without one goalkeeper in Joris Delle, suffered another injury blow as Hassen went off injured after a collision with Gerard Deulofeu.
The first task for Hassen's replacement, Yoan Cardinale, was to pick the ball out of the net as Xavi equalized from the spot.
Substitute Sandro Ramirez struck the post and Marc Bartra also spurned a late opportunity as Barca failed to find a winner.