Valverde made multiple changes to his full-strength side at half-time before Lionel Messi came on for the final 15 minutes of the game.
Messi was rested for Sunday's surprise loss to Levante, which denied Barca an unbeaten league campaign in their penultimate fixture, provoking criticism of coach Ernesto Valverde.
Lionel Messi didn't start but drew a roar from the crowd as big as any other on the night when he got up off the bench and started to warm up 20 minutes into the second half.
Solo: A Star Wars Story review round-up: 'It's pure fan service'
The other strike against the film is that for a not insignificant amount of its running time, the visuals are surprisingly bad. When Solo plays to its strengths, its an entertaining little adventure - little being the key word here.
This is the second time that Sundowns will host Barcelona for a friendly game, having previously met in 2007, a match that the Catalans won 2-1.
This year marks the centenary of the birth of Mandela, who died in 2013 having become the first democratically elected president of the republic 19 years earlier.
Sundowns managed to pull a goal back through Sibusiso Vilakazi in the 76th minute.
More sloppy defending gave Barcelona a third goal on 67 minutes when an interception set up Gomes to fire past substitute goalkeeper Kennedy Mweene.