Guerra added his second seven minutes later when he scored when one-on-one after Bebe's through ball.
The Rayo defence did well to limit Granada's chances but Jean-Sylvain Babin made the breakthrough in the 53rd minute when he met a corner kick to head into the bottom-right corner from six yards.
Youseff El Arabi thought he had completed the comeback 12 minutes later. He had the ball in the back of the net but the assistant referee's flag was up for offside.
Granada continued to push for an equaliser and Ruben Rochina came close in the closing stages, but time had run out on the visitors as Rayo claimed a hard-fought victory.
The result sees Rayo move up to 10th in the La Liga table, with Granada staying in 19th.