Bale went close to marking his return with a third-minute goal as his fierce low effort hit the outside of the post.
But Madrid fell behind four minutes later, Bebe working his way down the left and squaring for Embarba to open the scoring with a simple close-range finish.
Madrid quickly pressed for an equaliser, with Benzema acrobatically volleying over Mateo Kovacic’s lofted pass into the area.
However, Madrid’s task was made more difficult in the 14th minute when Miku lashed home after Madrid had failed to deal with corner from the right.
Bale got the visitors back into the contest 10 minutes before the break by meeting Toni Kroos’ right-wing corner with an excellent header into the bottom left of the net.
Benzema then came off, but Zidane’s men piled on the pressure in search of the leveller, which almost arrived when Bale curled wide from the edge of the area.
Despite Benzema’s withdrawal, Madrid restored parity seven minutes after the restart through his replacement.
Danilo did excellently dig out a superb right-wing cross that was met by Vazquez with a header that left the goalkeeper with no chance.
Bale sent Jese through on goal with a flick-on, only for Juan Carlos to deny the forward with a one-on-one save.
Wales international Bale continued to cause Rayo problems and his low ball from the right would have resulted in Madrid taking the lead had Vazquez been able to get a touch.
But, after Rayo defender Tito was taken off on a stretcher, Bale was finally rewarded for his strong performance nine minutes from time as he took full advantage of the hosts giving the ball away in their own half to pile the pressure on Barca and city rivals Atletico.