The Catalan outfit had plenty of chances in the early stages, but had to wait until the 25th minute to take the lead with David Villa finishing from close range.
Villa then turned provider five minutes before the interval when he fed Lionel Messi, who scored for the 18th league match in a row. The Argentine was at it again just before the hour mark when he converted from close range.
Rayo had a consolation via Raul Tamudo after 71 minutes, but they could not force a late comeback as the Catalan outfit held on for the three points.
Read how it all unfolded in Sports Mole's minute-by-minute live commentary of the action below.
BARCELONA: Pinto; Adriano, Pique, Mascherano, Alba; Busquets, Iniesta, Fabregas; Sanchez, Villa, Messi
RAYO: Ruben; Arbilla, Jordi, Tito, Galvez; Adrian, Trashorras, Piti, Carlos; Dominguez, Delibasic