Robert Lewandowski gave Xavi's side the lead inside one minute, before Alexander Isak equalised five minutes later.
The Blaugrana struggled to find a breakthrough and Sociedad were gaining momentum early in the second half.
Fati replaced Ferran Torres in the 63rd minute and he managed to change the game with two assists and a goal.
Three minutes after coming on, he produced a lovely backheel for Ousmane Dembele, who fired past Alejandro Balde at the far post.
Fati was then part of a lovely team move which ended with Lewandowski scoring his second of the game and Barcelona's third.
The 19-year-old wrapped up the scoring 11 minutes from time with a composed finish into the bottom right corner.
Fans on social media have reacted to Fati's performance and they're happy to see him getting back to his best.
One person said: "He's just reminded everyone why he's Barcelona's number 10."
Another commented: "Lewandowski and Fati running it back like Suarez and Messi."
A third tweeted: "Fati is a genuine freak how is a teenager performing like this?"
While someone put: "Makes me so happy to see a young footballer rebound from a tough injury and still play at a high level."
Fati has struggled to keep fit following knee surgery back in 2020 and he missed a large chunk of last season with a hamstring problem.
The Spain international was handed Barcelona's number 10 shirt after Lionel Messi's departure for Paris Saint-Germain last year.
He's regarded as one of the hottest prospects in world football and Fati believes the hardships have helped him grow on and off the pitch.
"You gradually get better and stronger every day," he told SPORTbible after becoming the face of Nike Underwear's collection and their 'Move to Zero' plans.
"With total effort and hard work, you can fix everything in the end. I've learned so much about myself during the recovery process."
Barcelona are now up to fifth in La Liga after a disappointing 0-0 draw with Rayo Vallecano in their La Liga opener.
Featured Image Credit: TFM Comps/YouTube
- Barcelona's Franck Kessie Sent Ansu Fati Flying Into A New Dimension In Training
- Heartbreaking Footage Emerges Of Ansu Fati Leaving Pitch In Flood Of Tears After Injury In Barcelona Defeat
- Only One Barcelona Star Interests Manchester City In Potential Ferran Torres Swap Deal
- Marc-Andre Ter Stegen Made An Incredible Reactive Save In The 91st Minute For Barcelona