David Villa opened the scoring in the 20th minute with a cool finish, but despite intermittent threat from the home side, Lionel Messi surged the Blaugrana further ahead with a thumping effort three minutes into the second half, his 300th senior goal for club and country.
Xavi ended the game as a contest when he struck his 50th La Liga goal in the 79th minute before Cesc Fabregas added the visitors' fourth goal almost immediately after, and Messi sealed matters with his second a minute before time.
Barca have now won eight of their opening nine games, and sit three points clear of Atletico Madrid, who square off against Osasuna on Sunday, while Rayo meanwhile remain mired in 13th place on 10 points.
With Carles Puyol, Gerard Pique and Javier Mascherano all absent, Adriano was chosen to start in central defence alongside Sergio Busquets, whose vacated midfield spot was filled by Alex Song.
Paco Jemez was also forced to shuffle his pack at the back, as Rodri replaced the suspended Mikel Labaka, while Jordi Amat was ruled fit enough to start in defence.
Rayo did a good job of unsettling the Blaugrana early on, forcing them into a few mistakes in possession and winning a succession of corners.
Fabregas avoided a potentially dangerous call when he tripped Leo Baptistao on the edge of the area, before the midfielder himself was then denied a penalty after being barged in the back by Cassado when attacking a ball into the box.
But Barca, despite their less than spectacular beginning, surged ahead in the 20th minute with one of their first real attacks of the game. Fabregas won possession in midfield and, spotting Villa’s run from the left flank, teed up the Spanish striker, who coolly slotted into the corner.
Villa had an attempt at another a few minutes later, but after finding himself in space at the edge of the box, could only direct his shot low within the reach of Ruben.
Messi then sent a free kick just wide, but Barca struggled to press home their advantage as the pressure from Rayo off the ball forced them outside of their tiki-taka comfort zone. In fact, the home side began to cause a few wobbles in the Blaugrana backline as the first half drew to a close.
Piti sent a half-volley just over the bar after attacking the ball on the edge of the area before Andrija Delibasic wasted Rayo’s best chance of the half, firing straight at Victor Valdes after finding himself with a clean run on goal.
Barca came out of the interval firing, though, and stormed into a two-goal lead barely three minutes after the restart. Martin Montoya’s overlapping run was spotted by the driving Pedro, and the young right-back squared to Messi, who thumped past Ruben from just inside the box.
However, Rayo looked to hit back quickly. Alejandro Dominguez’s cross was not properly cleared, leaving Javi Fuego with a clear shot that was well saved by Victor Valdes. Delibasic attacked the resulting corner at the near post, but could only flick his header over.
Valdes again denied Fuego from close range before Messi squandered a chance to put the game beyond any doubt after going clear thanks to a bad back-pass, but his lob over Ruben was well off target.
But Barca would put the game to bed with full time approaching. First, a surging run and cross from Alba was met with a fine finish from Xavi inside the area, who slotted expertly into the far corner in the 79th minute.
Fabregas made it 4-0 seconds after the restart, sidefooting Pedro’s centre home, before Messi added a fifth in the 89th minute after rounding Ruben from close range to put the finishing touches on an emphatic win for Barca, whose near-perfect start to the season continues.