The match was dominated by a superb hat-trick from Luis Suarez.
Martin Skrtel, meanwhile, helped himself to a double and the outstanding Daniel Sturridge also scored, but it needed a second-half masterclass from Liverpool after they twice found themselves behind and were being held 2-2 midway through a pulsating encounter.
Goals by Jordan Mutch and Fraizer Campbell raised the possibly of relegation-threatened Cardiff causing a stunning upset, but it was not to be, and they remain firmly in the relegation zone with just seven games left.
"We were probably a little bit too deep in the first-half and gave too much space to their players who were a threat," Rodgers said.
"We probably lost the ball one or two times too cheaply, but we were still an offensive threat.
"At half-time, we shortened the pitch a bit more, reinforced our idea to dominate the ball and that led to our chances. We showed great resilience and again showed our offensive power. It was an outstanding result for us.
"The mental resilience is how we've grown over the past 18 months, and that confidence to know we can get back in the game.
"You look at our imagination and creativity today. I think the crowd felt that every time we were in their half, we could score, so that's a wonderful recognition for the type of team that we are.
"We've got footballers, technicians, who can open up a game for us."
For breaking stories and all the great banter like us on Facebook: facebook.com/tribalfootball