The Portugal international scored twice and missed a penalty as Los Blancos overcame the Basque side in a game which saw the former Liverpool manager booed by the home crowd.
Cristiano Ronaldo recovered from a missed penalty to score twice as Real Madrid beat luckless Real Sociedad 3-1 on Wednesday, easing the pressure on coach Rafael Benitez.
Despite signing off for the mid-winter break with a 10-2 victory over Rayo Vallecano, Benitez remained under scrutiny and spoke of a "campaign" against the club in midweek before Ronaldo lifted the mood at a largely downbeat Santiago Bernabeu.