text: Leroy Fer gave the hosts a first-half lead when he steered the ball home from close range at the back post after Baston Borja's knockdown from a corner.
  Roberto Firmino levelled shortly after half-time when he headed in from Jordan Henderson's cross.
  Milner netted the winner six minutes from time after Firmino was fouled.
  The Liverpool midfielder's goal was just reward a dominant second half from his team, who have now won four Premier League games in a row.
  It was, however, a little cruel on Swansea, whose spirited performance has probably bought Guidolin a little more time to turn things around.
  The Swans are above the relegation zone on goal difference and have not won in the league since the opening day of the season.
  But the club's owners had indicated before the game that the manner of performances would have as much of a bearing on Guidolin's future as the results.
  Liverpool arrived in south Wales on a high, winning their past three league games and scoring 11 goals in the process.
  Despite his side's fluency in attack, manager Jurgen Klopp had expressed concerns about the Reds' fragility from set-pieces, and his fears proved well founded as they fell behind in scrappy circumstances.
  Rattled by their opponents' energetic pressing, Liverpool conceded a corner and, from it, Swansea's £15m record signing Borja headed across goal for Fer to turn the ball in from a yard out.
  The ragged visitors could have conceded another had Borja not been so wayward with a free header - and Liverpool fans may have feared another hard lucky story, akin to their only defeat of the season at Burnley, on 20 August.
  However, the visitors were vastly improved in the second half as they recaptured their recent impressive form and equalised thanks to more unsteady set-piece defending, as Firmino headed in from close range.
  Klopp's side dominated from that point and, after they were initially thwarted by dogged Swansea defending, they eventually struck when Angel Rangel pushed Firmino in the back and Milner calmly converted the penalty.
  In stark contrast to their high-flying opponents, Swansea entered the game in the midst of a torrid spell chairman Huw Jenkins described in the match programme as the hardest of his 12 years at the helm.
  Guidolin's future remains in the balance, with his side just one point above the relegation zone and without a league win since beating Burnley on 13 August.
  His players responded to his plight superbly, harassing Liverpool with a high-octane first-half display.
  However, they were overwhelmed after the interval and were powerless to stop Guidolin suffering a third successive league defeat for the first time in his tenure.
  His position is now as uncertain as ever.
  Although Swansea's owners have started compiling a shortlist of potential successors in the event of Guidolin's sacking, they indicated beforehand that the Italian would be given time to turn the club's fortunes around.
  Media playback is not supported on this device
  After yet another game without a win, though, that time may be running out for Guidolin.
  Swansea boss Francesco Guidolin:
  "The players gave me a good answer. Our relationship is good. There is no problem between me and my players.
  "I don't know [about the future]. It's not my decision. It's just for me to prepare for the game and the team. I know the situation. It's a possibility. The important thing is to prepare with patience.
  Media playback is not supported on this device
  "Before the game I saw the new owners Jason [Levien] and Steve [Kaplan] just to say 'hello'. I don't know if in the next day there's meeting."
  Liverpool manager Jurgen Klopp:
  "I thought we could have done better in the first half. Our body language was not good, we were static and it was easy to defend against us. We are not as good as we should have been.
  "You have to show why we are here. We showed a reaction, were more organised, clear in all situations and we deserved to win.  Of course I am happy we have had two or three brilliant games in a row.
  "If Milner is our top scorer at end of the season with penalties, I have no problem with it. All is good. The performance was not perfect but it was good enough."
  After the international break, Swansea face another tough game in the Premier League when they head to Arsenal on Saturday, 15 October (15:00 BST). Liverpool face fierce rivals Manchester United at Anfield on Monday, 17 October (20:00 BST).
  Match ends, Swansea City 1, Liverpool 2.
  Second Half ends, Swansea City 1, Liverpool 2.
  Attempt missed. Mike van der Hoorn (Swansea City) right footed shot from the centre of the box misses to the left. Assisted by Angel Rangel with a cross.
  Attempt saved. Divock Origi (Liverpool) right footed shot from outside the box is saved in the bottom right corner. Assisted by Philippe Coutinho.
  Attempt saved. Philippe Coutinho (Liverpool) left footed shot from a difficult angle on the left is saved in the bottom right corner. Assisted by Divock Origi.
  Substitution, Liverpool. Divock Origi replaces Roberto Firmino.
  Substitution, Liverpool. Emre Can replaces Georginio Wijnaldum.
  Goal!  Swansea City 1, Liverpool 2. James Milner (Liverpool) converts the penalty with a right footed shot to the high centre of the goal.
  Penalty Liverpool. Roberto Firmino draws a foul in the penalty area.
  Penalty conceded by Angel Rangel (Swansea City) after a foul in the penalty area.
  Corner,  Liverpool. Conceded by Borja Bastón.
  Attempt blocked. Joel Matip (Liverpool) header from the right side of the six yard box is blocked. Assisted by Jordan Henderson with a cross.
  Corner,  Liverpool. Conceded by Jack Cork.
  Attempt blocked. Philippe Coutinho (Liverpool) right footed shot from outside the box is blocked. Assisted by James Milner.
  Foul by Joel Matip (Liverpool).
  Gylfi Sigurdsson (Swansea City) wins a free kick on the left wing.
  Delay over. They are ready to continue.
  Delay in match Loris Karius (Liverpool) because of an injury.
  Corner,  Swansea City. Conceded by Joel Matip.
  Corner,  Swansea City. Conceded by Joel Matip.
  Attempt blocked. Jay Fulton (Swansea City) header from the centre of the box is blocked. Assisted by Modou Barrow with a cross.
  Corner,  Liverpool. Conceded by Modou Barrow.
  Substitution, Swansea City. Jay Fulton replaces Leroy Fer.
  Attempt missed. Daniel Sturridge (Liverpool) header from the centre of the box misses to the left. Assisted by Philippe Coutinho with a cross following a corner.
  Corner,  Liverpool. Conceded by Kyle Naughton.
  Attempt blocked. Sadio Mané (Liverpool) left footed shot from the centre of the box is blocked. Assisted by James Milner.
  Attempt saved. Nathaniel Clyne (Liverpool) right footed shot from outside the box is saved in the centre of the goal. Assisted by Georginio Wijnaldum.
  Nathaniel Clyne (Liverpool) wins a free kick in the defensive half.
  Foul by Modou Barrow (Swansea City).
  Corner,  Liverpool. Conceded by Jordi Amat.
  Jordan Henderson (Liverpool) wins a free kick in the defensive half.
  Foul by Gylfi Sigurdsson (Swansea City).
  Substitution, Swansea City. Ki Sung-yueng replaces Leon Britton.
  Substitution, Swansea City. Modou Barrow replaces Wayne Routledge.
  Corner,  Liverpool. Conceded by Angel Rangel.
  Attempt blocked. Georginio Wijnaldum (Liverpool) right footed shot from outside the box is blocked. Assisted by Nathaniel Clyne.
  Attempt missed. Philippe Coutinho (Liverpool) right footed shot from outside the box is close, but misses to the right. Assisted by Georginio Wijnaldum.
  Sadio Mané (Liverpool) wins a free kick in the defensive half.
  Foul by Jack Cork (Swansea City).
  Goal!  Swansea City 1, Liverpool 1. Roberto Firmino (Liverpool) header from the centre of the box to the bottom left corner. Assisted by Jordan Henderson following a set piece situation.
target: James Milner's late penalty gave Liverpool a hard-fought victory over Swansea, increasing the scrutiny on Swans boss Francesco Guidolin.