The Reds took the lead inside three minutes when Raheem Sterling's angled through-ball sent Daniel Sturridge scampering through. The striker kept his composure to round the goalkeeper and tap into an empty net.
© Getty Images
Jordan Henderson doubled the advantage after 20 minutes when he curled in an effort from the edge of the box.
However, Jonjo Shelvey reduced the deficit two minutes later when he bent a shot into the top corner off the bar from Nathan Dyer's assist.
However, Sturridge gave the hosts the lead once more when he headed home Luis Suarez's floated cross with 36 minutes played.
© Getty Images
Suarez then tried to catch Michel Vorm unaware from close to the halfway line, but his effort dropped just wide.
The half-time break failed to change the pattern of play, and Swansea were level again with just two minutes played in the second half.
Skrtel pulled back Bony inside the box, which was enough for the referee to blow the whistle for a penalty. Bony then stepped up to power the spot kick beyond a diving Mignolet.
With an hour played, Bony flicked the ball into the path of Jonathan de Guzman, who had just Mignolet to beat. However, the goalkeeper stayed on his feet and blocked the attacker's tame shot.
There were big shouts for a Liverpool penalty as Suarez took a tumble following a challenge from Ashley Williams just inside the Swansea box, but the referee waved play on.
It looked like the Swans would leave Anfield with at least a point, but the home fans erupted once more with 15 minutes remaining.
Suarez's shot from distance was blocked by Williams, and the ball rebounded to Henderson. The midfielder saw his first shot saved, but was alert to pounce on the rebound to make it 4-3.
Steven Gerrard hit the post in injury time, as Liverpool held on for a dramatic win.