The visitors were gifted the lead following their first attack of the game, with Brazilian Willian José keeping his cool to break the deadlock.
Former Newcastle man Mikel Merino attempted to drive into the Madrid box, only to be met with a barge in the back from opposite number Casemiro for his troubles.
The man in the middle didn't hesitate, immediately point to the spot and Willian José did the rest.
The Samba star gathered himself to smash a powerful effort striaght down the middle and into the roof of the net to score his first goal since September 25.
It was just the start that the Basque outfit was looking for, having gone into the game hovering alarmingly close to the relegation zone.