The Reds were not at their best in the opening 45 minutes in Wales and found themselves trailing after Leroy Fer had tapped in for the Swans early on.
However, Liverpool emerged for the second half and turned in a dominant performance that was rewarded with three points thanks to Roberto Firmino’s header and Milner’s late penalty.
The vice-captain said: “It needed to be better, I think we all knew that. Big credit to the manager and all the boys. The manager knew it, he was angry but he kept most of it in, said what needed to be said and got us going.