The hosts were much the better side in the first half at Loftus Road, twice striking the crossbar as Liverpool struggled to find their rhythm.
But it was Rodgers' men who broke the deadlock midway through the second half as Richard Dunne put through his own net, before a frenetic finish saw four goals from the 87th minute onwards.
Steven Caulker's own goal settled matters after Eduardo Vargas had twice drawn QPR level, and Rodgers admitted that Liverpool scarcely deserved the three points.
"I thought we were fortunate," the Liverpool manager said. "I like to win, and I like to win in a way we work on a daily basis and that was nowhere near what I would expect from a team of mine.
"I have to applaud the team and their character, even when we went behind we still kept going, and showed great courage to do that.
"We have gained three points having been nowhere near what this team has the capacity to play.
"The dynamic of the team has changed, there is no magic wand to make it work instantly, we are working hard to improve our performance level, but that will improve."
Liverpool now sit fifth in the table with 13 points from eight matches, leaving them nine shy of leaders Chelsea.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.