The Welshman, who joined Madrid from Tottenham for a reported world record fee of around £80m earlier this month, turned home Dani Carvajal’s cross five minutes from half-time to send Madrid in level at the break after Cani had given Villarreal a deserved lead.
Bale was then withdrawn to make way for Angel Di Maria on the hour mark, but the visitors were in front just two minutes later when Cristiano Ronaldo’s effort ricocheted past Sergio Asenjo in the Villarreal goal.
However, Giovani Dos Santos, another former Tottenham player, swept home after Diego Lopez had denied Cani a second 21 minutes from time to preserve Villarreal’s unbeaten record on their return to the top flight as Real fell two points behind Atletico Madrid and Barcelona at the top of the table.
With Madrid sporting four changes in all since their last outing, Carlo Ancelotti’s men were pulled apart in the early stages by the hosts and were thankful to Lopez for making two important stops from Jonathan Pereira.
The hosts did finally go in front on 20 minutes when a loose ball fell perfectly for Cani inside the area and his scuffed effort looped over Lopez and into the net.
Lopez then pulled off a sensational double save to deny Javier Aquino doubling Villarreal’s advantage, but Real slowly started to find a route back into the game and should have been level when Ronaldo headed wildly wide from Sergio Ramos’ fine pass.
The visitors were level five minutes before the break though and it was Bale who was on target as he slid in to turn Carvajal’s driven cross home.
Bale came close again just after the break as he whistled a shot just over, but having only played 30 minutes of competitive action so far this season he was then understandably withdrawn along with fellow debutant Asier Illarramendi on the hour mark.
And within two minutes Madrid were ahead in bizarre fashion as Ronaldo’s initial effort was blocked but rebounded back off the Portuguese’s shins and past the helpless Sergio Asenjo.
Villarreal weren’t to be denied though and after Lopez had produced another stunning save to turn away Cani’s drive from distance, Dos Santos reacted quickest to drive the ball into the far corner.
Barcelona maintained their 100 per cent league record in controversial circumstances as Alexis Sanchez’s injury time goal handed them a 3-2 win over Sevilla.
The visitors were left fumming as not only did the Chilean’s goal arrive after the three minutes of additional time indicated by the referee had been played, but they also had what appeared to be a perfectly good goal ruled out in the second-half.
Dani Alves had headed Barca into a first-half lead before the first controversial moment arrived when Juan Cala’s header was ruled out for a push 25 minutes from time.
Lionel Messi then looked to have sealed the points when he fired home 15 minutes from time, but Sevilla bounced back with two goals in the final ten minutes from Ivan Rakitic and Coke.
However, there was one final twist as Sanchez prodded home from close range after Beto could only parry Messi’s driven cross.
In the earlier matches, Atletico Madrid triumphed over Almeria with four different goalscorers. David Villa opened the scoring in the 14th minute before Diego Costa struck in a penalty in the 36th minute. Almeria responded quickly with a goal in the 39th minute from Rodri.
After the break, Tiago scored in the 63rd-minute goal only for Madrid’s win to be cemented three minutes later from Koke. Just like the first half, Alex Vidal scored late in the half for Almeria, giving Madrid the 4-2 win.