Bale beauty keeps Madrid on Atletico, Barca's tails
Atletico stay top, three points clear of third-placed Real, as they squeezed out a tense 1-0 win over Villarreal, whilst Barca remain in second after overcoming Real Betis 3-1 thanks to two goals from Lionel Messi.
Real were leading 1-0 thanks to Asier Illarramendi's opener when Bale pounced on an error from Sociedad keeper Claudio Bravo to register his 18th goal of the season with a sweet left-footed striker 25 minutes from time before Pepe and Alvaro Morata rounded off the scoring.
"I value the whole game because I think everyone played well and with a lot of intelligence," said Real boss Carlo Ancelotti.
"I am very happy tonight because it was not an easy game. I have a team that likes to fight and I am very proud of them."
Without World Player of the Year Ronaldo due to a knee problem, Madrid took their time to get going in San Sebastian and could have been behind when Antoine Griezmann's header flashed just over the bar midway through the first-half.
However, Carlo Ancelotti's men went in front the first time they really threatened the Sociedad goal as Bale fed Karim Benzema and when Bravo could only parry the Frenchman's effort, Illarramendi was on hand to slot home against his former club.
Sergio Ramos and Benzema then struck the bar as Real started the second-half with greater intent.
Bale killed the game off as a contest when he collected Bravo's errant clearance and thumped the ball into the bottom corner before the Chilean international could get himself back into position.
Pepe added a third as he turned home Ramos' knockdown before substitute Alvaro Morata broke clear to make it 4-0.
Barcelona were made to struggle at home to bottom-placed Betis as they needed two penalties and a Jordi Figueras own goal to see off Los Verdiblancos.
Messi put his side in front from the spot after just 15 minutes and the hosts looked to have the game sewn up when Figueras turned the ball into his own net from fully 20 yards.
Ruben Castro brought Betis back into the game moments later, but Messi killed the game off four minutes from time by slotting home the rebound after Antonio Adan had saved his second penalty of the day.
And Barca boss Gerardo Martino admitted his side had suffered a bit of a hangover from their Champions League clash with Atletico in midweek.
"When you play for something that is so important twice in such a short period of time as the two games against Atletico what comes in the middle isn't as decisive," he said.
"I was also a bit short with the rotation of the players. Watching the game I could have given more rest to some of the players that played against Atletico."
Atletico were also far from their best as an early goal from Raul Garcia was enough to claim all three points at home to Villarreal.
"We were holding on more because it was only 1-0 than because Villarreal had a lot of chances," admitted Atletico boss Diego Simeone.
"The players have come from making a huge effort in midweek and I can't find the words to keep congratulating them on their effort and commitment."
Atletico were without top scorer Diego Costa due to a hamstring problem and Simeone made five changes in all from the side that started Tuesday's 1-1 draw away to Barca.
The hosts opened the scoring 14 minutes in when Koke's corner picked out captain for the day Garcia to head home at the near post for his 16th goal of the season.
Atletico were then happy to sit on their lead as Villarreal enjoyed plenty of possession, but without their top goalscorers Giovani dos Santos and Ikechukwu Uche they lacked a goalscoring threat in the final third.
Jeremy Perbet was inches away from an Villarreal equaliser as his curling effort dipped onto the roof of the net and disaster nearly struck for Atletico a minute from time when Toby Alderweireld turned Moi Gomez's low cross inches past his own post.
However, the leaders held on for a third straight 1-0 win at home in La Liga to remain in pole position with just six games left to play.