The striker fired low to Alexander Doni's left from Angel Rangel's astute ball across the box to give the Welsh side a win at the Liberty Stadium to rank alongside their successes over Arsenal and Manchester City earlier this term.
The hosts dominated the opening half and were denied by two excellent saves from Doni, who brilliantly kept out Gylfi Sigurdsson's free-kick and denied Nathan Dyer.
The visitors proved more of a threat after the break with Michel Vorm making a stunning save from Andy Carroll's overhead kick and denying the £35million striker's low shot before Graham struck.
It was another demoralising afternoon for Kenny Dalglish's side, and will have done little to lift the pressure on the Scot after a thoroughly disappointing league campaign.
Swansea manager Brendan Rodgers had encouraged the home fans to turn up in Elvis Presley costumes to celebrate their survival.
And the joyous atmosphere seemed to inspire them as they bossed the opening exchanges, with Liverpool barely having a kick.
Graham came close to giving them an eighth-minute lead but could not convert Joe Allen's cross-shot after the midfielder had robbed Jonjo Shelvey.
Carroll's afternoon had started ignominiously by misdirecting an attempted flick-on straight in the air, and then being beaten By Vorm as he closed the Swansea keeper down.
And his overhit pass back into defence was picked up by Doni, prompting referee Mark Halsey to award Swansea an indirect free-kick inside the box, but Scott Sinclair's shot was well blocked.
Maxi Rodriguez was off target with a half-hearted effort for the visitors but the majority of the action was taking place in the Liverpool half.
Gylfi Sigurdsson was left unmarked at a corner and almost swept home from Allen's pinpoint delivery but his effort was bravely blocked by the onrushing Liverpool defence.
Shelvey threatened at the other end but his on-target effort was blocked away by Ashley Williams' head.
Sigurdsson was brilliantly denied by Doni in the 32nd minute, as the Iceland international intelligently struck a free-kick across the Liverpool wall, but the Brazilian showed lightning reactions to tip the ball round the post.
Carroll wasted Liverpool's best chance when he fired narrowly over Vorm's bar five minutes before the break, while Dyer did the same for Swansea at the other end as Doni blocked his strike after being played in by Sigurdsson.
Carroll's increasing frustration was clear to see and he was involved in a tussle with Williams at the end of the opening half after objecting to the defender's challenge, which earned the pair bookings.
Dalglish had his players out very early for the second half but any strong half-time words appeared to have little effect as Swansea again set about their familiar possession style.
Dyer failed to make the most of good link work with Angel Rangel when he dallied after being picked out by the Spaniard's low pass.
Liverpool began to assert themselves as Carroll's far-post header diverted to safety off Steven Caulker's back, before the England forward produced a brilliant overhead kick that Vorm matched with a superb agile stop to his right.
Carroll's central role in proceedings continued as his clumsy defensive clearance almost allowed Rangel to poke home, before Steven Caulker wastefully headed over from the resulting corner.
Swansea showed signs of fading as the game entered its final 20 minutes, and Vorm made another sharp save from Carroll's low shot after a bright run from substitute Dirk Kuyt.
But the hosts struck to find the winner as Rangel and Sinclair linked on the right and Graham converted coolly for his 14th goal of the season.