Cristiano Ronaldo scored the winner 18 minutes from time at the Camp Nou to send Real seven points clear at the top of La Liga with four games remaining.
"I want to congratulate Madrid for the win and for the league they are going to win," the 41-year-old said.
Guardiola seemed to prioritise Tuesday's Champions League semi-final second leg against Chelsea by omitting Cesc Fabregas and opting for the inexperience of young winger Cristian Tello, who wasted one glorious chance.
"Maybe I was wrong, leaving out Cesc," Guardiola admitted.
Defeat meant that Barca suffered back-to-back defeats for the first time since May 2009 and Guardiola will be hoping to turn around Chelsea's one-goal lead on Tuesday.