With the game petering out to a goalless stalemate, Lobete collected a pass just outside the penalty area with barely 10 seconds of regulation time remaining, wriggled into space and fired a shot past Manolo Reina, which the goalkeeper perhaps should have stopped.
The goal sparked pandemonium inside the Reale Arena, the fans that had been absent for so long as a result of the COVID-19 pandemic going crazy as their side climbed over Real Madrid to lead the league.
The fans also had a first look at the Copa del Rey trophy that Real Sociedad won earlier this year when it beat Basque rival Athletic Club in the postponed 2019-2020 final.
Real Madrid and reigning LaLiga champion Atletico Madrid are sitting out this weekend's matches after the extended South American international break left them with depleted squads.
While a point would have been enough for Real Sociedad to go top, the victory was all the sweeter, not least after losing Aihen Munoz at the end of the first half when he was shown a second yellow card for a poor challenge on Mallorca's Rodrigo Battaglia.
La Real held firm throughout the second period, despite its numerical disadvantage, and should now consider itself a realistic contender for the title.
"These players don't lack ambition or belief but when the fans are like that in Reale Arena, it's easier," said coach Imanol Aguacil.
"We were able to celebrate with them, show them the cup and live that moment with them. We know the love they have for the players and from the players for the fans."