The forward came on to seal a second half turn around as Barça closed the season with a win
Ansu Fati scored the winning goal off the bench as Barcelona came from behind to beat the A-League All-Stars 3-2 in a friendly in Sydney on Wednesday.
Ousmane Dembele gave Barça the lead but the Australian side fought back with goals at the start of the second half from Reno Piscopo and Adama Traore.
Barca levelled through their own Adama Traore and then won the match late on when substitute Ansu finished calmly inside the box.
The game finally brings Barca's season to a close after they ended the LaLiga campaign with a 2-0 defeat at Camp Nou against Villarreal on Sunday.
Alejandro Balde came close to opening the scoring but the breakthrough came through Dembele's low finish after good work from Gavi.
Barça looked in complete control but lapses in defence at the start of the second half turned the game on its head.
Piscopo bundled home from close range after Tenas' initial save and then Traore rifled home to give the All-Stars the lead.
Xavi Hernandez's side always looked like they had more gears to go through and they levelled through Traore's looping deflected effort.
Ansu then finished expertly to seal the win after a brilliant run from fellow youngster Antonio Aranda, the B team midfielder making his first appearance for the first team.
Ter Stegen (Tenas), Alves, Araujo, Umtiti (Mika Marmol), Balde (Alba), Busquets (Orellana), Sanz (Aranda), Gavi (F-de Jong), Adama (Ansu), L-de Jong (Aubameyang), Dembele