The Spanish minnows stunned the Camp Nou crowd as they raced into an early lead thanks to Cucho Hernandez's effort.
And Huesca's strike was no ordinary goal as they put together a move which contained 19 passes en route to finding the back of Barcelona's net.
The 19 passes in the build-up to the goal were the most by a team in a La Liga game against Barcelona at Camp Nou since at least 2005/06.
19 - There were 19 passes in the build up to Huesca's goal in this game; the most by a team in a La Liga game against Barcelona at Camp Nou since at least 2005/06. Historic. pic.twitter.com/xYwIKriDlk— OptaJose (@OptaJose) September 2, 2018
Lionel Messi soon ended Huesca's joy, though, as the Argentina superstar levelled the tie on the 19th-minute mark.
Jorge Pulido scored an own goal to put Barcelona 2-1 in front before Luis Suarez added a third for the hosts.
Huesca were not done there, though, as Alex Gallar netted a second for the visitors just before the half-time interval.
But Ousmane Dembele restored Barca's two-goal buffer with a strike after 48 minutes and Ivan Rakitic added a fifth for the hosts.
There was no way back for the Aragonese outfit when Messi scored his second of the game after the hour mark, before Jordi Alba made it 7-2.
And Suarez wrapped up the scoring for Barca with a strike in stoppage time.