The Zinedine Zidane’s side took advantage of Barcelona’s goalless draw against Sevilla on Friday and returned to the top of the summit, thanks to their superior head to head record.
After a goalless first half, Real Madrid were awarded a penalty after Vinicius Jr was fouled in the box and Sergio Ramos made no mistake as he converted the spot-kick for his 68th club career goal.
The goal also saw the Real Madrid captain overtake Ronald Koeman as the La Liga all-time leading scorer.
Former Manchester United forward Adnan Januzaj brought Sociedad leveled but it was later ruled out for offside and moment later In from Karim Benzema added second.
Mikel Merino reduced the deficit for the Basque team, but Madrid held on for a vital win after a tense final 15 minutes.
Madrid however needed eight more victories to win the league for the first time since 2017.
They play at home to Mallorca on Wednesday while Barcelona host Athletic Bilbao on Tuesday.
Source: Brilla sports