Bojan Krkic, in for the injured Zlatan Ibrahimovic, opened the scoring after a quarter of an hour, before Pedro and Yaya Toure - in an out of the side all season - added fantastic strikes in the second half to keep Barca in pole position in the table.
Barca coach Pep Guardiola believes his side are in good shape coming into the business end of the season.
"We are in better shape than at the end of last season and that is a good sign," he said.
"The team has great mental strength and Madrid will oblige us to be switched on all the way," he added.
Madrid face Almeria on Thursday and could close the gap back to three points. Guardiola described that advantage as "ridiculous" in the build-up to Wednesday's game and the Barca coach knows now is not the time to slip up.
"There is not much of the season left and desire will take us where we want to go - we have historic opportunities, which won't come back, so we have to grab them," he said.