The Reds took the lead after just four minutes through a Salah penalty but Leeds levelled with a superb goal from Jack Harrison eight minutes later.
Virgil van Dijk then headed home an Andrew Robertson corner in the 20th minute to put the Reds back ahead but terrible defending then created an opening for Patrick Bamford to equalise on the half hour mark only for Salah to then smash home Liverpool's third just two minutes later.
Amazingly, United then drew level for a third time in the 66th minute via a clinical finish from Mateusz Klich but Liverpool ultimately bagged all three points after Salah converted a second penalty for his hat-trick in the 88th minute.
Liverpool created a chance in the second minute when Naby Keita played in Roberto Firmino who opted to cut back when bearing down on Illan Meslier who has able to keep the forward at bay.
But just one minute later the Reds were awarded a penalty when Salah's fierce shot struck the arm of new Whites recruit Robin Koch and Salah stepped up to smash the spot kick down the middle and into the roof of the net.
Leeds stuck to their usual attacking game plan and Helder Costa had the ball in the net in the ninth minute but was correctly flagged offside before Pablo Hernandez narrowly failed to pick out Patrick Bamford.
But moments later United drew level when Harrison brilliantly controlled a raking pass from Kalvin Phillips before turning inside and unleashing a fine shot into the bottom corner in the 12th minute.
The Reds looked to have gone back ahead in the 16th minute when Sadio Mane lobbed a stranded Meslier but Andrew Robertson had already been flagged offside.
But Liverpool did indeed go back in front in the 20th minute when Robertson's corner was thundered home via a bullet header from van Dijk who evaded Koch's efforts to mark him.
Even then, United should have equalised for a second tine moments later when Luke Ayling played in Bamford who opted to try and take the ball around 'keeper Alisson rather than shoot and saw the chance squandered.
Reds captain Jordan Henderson then saw a powerful drive saved by Meslier who then produced a brilliant finger tip save to keep out what would have been a Pascal Struijk own goal.
Keita then saw an effort blocked but slack defending from van Dijk then offered an opening for Bamford who this time made no mistake in sliding the ball past Allison on the half hour mark.
Yet Liverpool then regained the lead in a crazy game just three minutes later when Struijk's headed clearance to a cross fell to Salah who absolutely smashed home a rocket of a finish into the top right.
Meslier then produced another smart save to deny Mane who was wrongly flagged offside and moments later another Mane shot was deflected wide.
Leeds were then denied a penalty just before half-time after Costa went to ground before a breathless first half finally drew to a close.
The first chance of the second half arrived just four minutes after the restart with Meslier producing another good save to deny Georginio Wijnaldum who should have scored from close range.
Van Dijk then headed over from a corner before an offside flag ruled out what would have been a third Leeds equaliser as Trent Alexander-Arnold headed into his own net under pressure from Harrison after a neat lob.
A fine Leeds move then ended with a Stuart Dallas being parried away by Alisson before Mane sent a lob over the bar at the other end.
Record Whites signing Rodrigo was then handed his Leeds debut as a 63rd minute substitute on for Bamford as Tyler Roberts also replaced Hernandez.
And just four minutes later Leeds drew level for a third time when a fine pass from Costa picked out Mateusz Klich who clinically controlled and finished from inside the box.
Salah, on a hat-trick, then blazed a volley over the bar before Phillips curled a free-kick just wide of the post.
Van Dijk was then denied his second and Liverpool's fourth from a corner as Curtis Jones fouled Koch before the defender walloped home a powerful finish.
Roberto Firmino then looked destined to net the home side's fourth goal in the 87th minute when clean through only to see his weak shot from close range blocked.
But seconds later Rodrigo made a clumsy challenge on Fabinho trying to defend the corner and the lethal Salah made no mistake with his second spot kick.
Liverpool: Alisson, Alexander-Arnold (Matip 89), Gomez, Van Dijk, Robertson, Henderson (Jones 66), Wijnaldum, Keita (Fabinho 59), Salah, Firmino, Mane. Subs not used: Adrian, Milner, Minamino, Origi.
Leeds United: Meslier, Ayling, Koch, Struijk, Dallas, Phillips, Klich (Shackleton 81), Costa, Hernandez (Roberts 63), Harrison, Bamford (Rodrigo 63). Subs not used: Casilla, Casey, Alioski, Poveda.
Leeds has a fantastic story to tell - and the Yorkshire Evening Post has been rooted firmly at the heart of telling the stories of our city since 1890.
We believe in ourselves and hope you believe in us too. We need your support to help ensure we can continue to be at the heart of life in Leeds.
Subscribe to our website and enjoy unlimited access to local news and information online and on our app.
With a digital subscription, you can read more than 5 articles, see fewer ads, enjoy faster load times, and get access to exclusive newsletters and content.
Click here to subscribe.
For more details on our newspaper subscription offers click here.
Thank you Laura Collins