Sevilla started the second half brightly, but it was the visitors who struck first, winning a penalty five minutes into the second period following a handball; Alejandro Dominguez dispatched the spot kick.
However, the scores were level for just three minutes, as Alvaro Negredo picked up a low cross deep inside the penalty area to restore the hosts' lead.
Sevilla saw the better of the chances for the remainder of the game as they looked to secure the result.
The home side finished the match with 10 men, after Rakitic picked up his second yellow card deep into stoppage time.
The result moves Sevilla up to 11th in the table, while Rayo remain in sixth.