The hosts sat in the relegation zone with just one win in 16 Barclays Premier League games coming into the match and looked set for another night of disappointment when Liverpool took a two-goal lead at Loftus Road.
However, Shaun Derry started an unlikely comeback with a 77th-minute header and former Liverpool striker Djibril Cisse levelled four minutes from time.
The unthinkable occurred in stoppage-time as substitute Jamie Mackie slotted past Jose Reina to make it 3-2 and secure the west Londoners an invaluable three points.
Liverpool had looked on course for victory after Sebastian Coates' superb scissor-kick and a Dirk Kuyt effort put Dalglish's side 2-0 ahead.
The Reds manager was stunned by QPR's comeback and thought the hosts were recipients of the luck that eluded them last week when Clint Hill had a goal wrongly chalked off at relegation rivals Bolton.
"I don't think anyone saw it coming," Dalglish said.
"The way we started the game was fantastic, the passing and the movement - the only thing missing was in front of goal.
"They came in at 0-0 at half-time and it could have easily been 3-0 or 4-0.
"You didn't even see them getting a goal. Maybe the luck they never got at Bolton, they got it tonight [Wednesday night] with a last-minute winner.
"I don't have any answers. We dominated the game. We were really creatful, thoughtful and professional but they have walked away with three points."
Dalglish revealed that Charlie Adam twisted his knee in a challenge with Armand Traore - who picked up a hamstring complaint of his own in the clash - while Martin Kelly also suffered a knock in the first half.
"Charlie twisted his knee a little bit," Dalglish said. "We need to see how he is."
QPR manager Mark Hughes wants the comeback which brought victory over Liverpool to be a season-defining moment for the embattled side.
"It could be a defining moment and we have to make sure that it is," Hughes said after the match.
"I think we have been frustrated in recent weeks because we have felt things have gone against us. Things have been taken out of our hands.
"We haven't done too badly in games performance-wise but we haven't been able to get points on the board.
"Certainly in the first 20 minutes we looked nervous in terms of trying to get a foothold in the game and Liverpool were very strong in that opening period.
"They came out fast and we looked apprehensive, which is understandable I would suggest.
"We started to get back into the game and obviously going two goals behind to Liverpool is difficult for any team.
"But we showed great belief and we were determined to get something out of the game when we got one back.
"You hope for nights like this where things go for you and you go back on level terms.
"Possibly at that point we would have taken [a point], but thankfully Jamie Mackie did not feel that way and took it away from Liverpool. It is a great night for him and everybody.
"There were some big performances right across the board. From our point of view it was huge in terms of belief and what we will take out of the game.
"Now it is important we look to the weekend and make sure we don't let this go to waste."
QPR go to Sunderland on Saturday.
Mackie was only introduced to the fold in the 62nd minute when he replaced the ineffectual Joey Barton.
The QPR captain's departure was met by cheers from the home faithful, who booed the midfielder off the field.
Asked whether he was concerned about the fans' reception, Hughes said: "I was not aware of that. Joey was not having the best of times.
"It was unfortunate that maybe a few felt the need to possibly boo him, but Joey is very strong as we all know.
"He won't let it effect him and he will play a big part in what we do from now until the end of the season.
"Tonight [Wednesday night] was not his night, but there will be other nights."