It was the former Arsenal striker's ninth goal in LaLiga for Barça and his 11th in all competitions since he signed in January.
Thursday's winner was a header at the far post, set up by Ferran Torres, who he thanked personally on Barça TV: "Once again a great pass from Ferran."
Aubameyang's goal moved Barça back up to second in LaLiga and they now have a six-point cushion to fifth as they chase a Champions League place.
"We suffered for the win, but it's good for us," he added. "It's an important win and after two games, let's say a little complicated, that was the most important. I think we did things well, there was a good attitude, which was important tonight."
He continued: "It was important for us to do things like we did today. Everyone fought until the last minute and we had a good attitude today. It was important to win tonight.
"It was not an easy game, everyone suffered today because Real Sociedad played very well. We did well, the right attitude, gave everything until the end and it was another step towards qualification for the Champions League."