Goals from Murray Davidson and Callum Davidson put Steve Lomas' side in complete control after a one-sided first half.
Pars substitute Paul Burns halved the deficit on a rare attack but Lee Croft killed off the game with a fine third.
St Johnstone are fourth behind Motherwell, while relegation-threatened Dunfermline sit three points behind Hibernian at the bottom having played a game more.
McDiarmid Park boss Lomas made just one change to his line-up from the 0-0 draw with Aberdeen last weekend. Croft returned to the right side of midfield as Chris Millar was left on the bench.
Dunfermline manager Jim McIntyre made three changes to the side that lost 2-0 to Celtic in midweek. Austin McCann, Gary Mason and Martin Hardie were all restored to the side, with Burns and Kyle Hutton dropping to the bench. Kevin Rutkiewicz missed out completely.
St Johnstone were out to end a poor run of home form, having suffered three successive defeats in Perth.
Dunfermline, with only one win since November 5, were looking to put pressure on relegation rivals Hibs.
The home side hogged possession from the start and Dunfermline were pinned back in their own half. Francisco Sandaza was looking lively and several dangerous crosses were fired in, but Dunfermline held firm.
St Johnstone were dealt a blow in the 15th minute when Jody Morris limped off, with Millar replacing him.
Dunfermline goalkeeper Chris Smith has been heavily criticised this season but pulled off a superb double save as first he dived to his right to keep out Croft's drive and then somehow clawed Sandaza's rebound effort off the line.
St Johnstone kept pressing and Frazer Wright's goalbound header was blocked by Paddy Boyle.
It was one-way traffic and St Johnstone were inches away from taking the lead in the 26th minute. Liam Craig's inswinging free-kick missed everyone and smashed off the post, before Dunfermline scrambled clear.
Sandaza's movement was exceptional and a lovely flick released Croft, but his low shot was gathered by Smith. Murray Davidson was next to try his luck with a turn and low drive in the 32nd minute but again Smith saved well.
However, that only postponed the inevitable as St Johnstone finally broke the deadlock 60 seconds later. Croft's chip was headed into the box by Millar and Murray Davidson swept home after good work from Sandaza.
In St Johnstone's next attack, it was 2-0. Sandaza found space in the box and fed Callum Davidson with a sublime disguised pass. The full-back raced clear on goal and made no mistake from eight yards with a fine low finish.
Dunfermline boss McIntyre made another change at the break, with Paul Willis replacing Boyle.
However, that did nothing to alter the flow of the game and the Pars manager threw on Andy Kirk for Liam Buchanan in the 55th minute.
Still St Johnstone dominated. Sandaza was leading the line superbly and teed up Murray Davidson for a shot that was blocked.
The Spaniard then burst through himself on the hour-mark, twisting and turning before shooting narrowly wide.
Dunfermline at last applied some pressure on the St Johnstone defence but David McCracken made a brave block from Andy Dowie's drive.
Croft smashed a rising drive off the upright in the 69th minute as St Johnstone chased a third but it was Dunfermline who grabbed an unexpected lifeline in the 73rd minute when Burns' curling shot came through a sea of bodies and nestled in the corner.
However, St Johnstone regrouped and almost added a third when Craig's shot flew across the face of goal. Craig was handed a second chance moments later and forced Smith into a brave save.
But St Johnstone would not be denied for long and Croft made it 3-1 in the 78th minute with a precise finish from 12 yards after some great skill.
Cillian Sheridan then hit the post in injury time as St Johnstone cruised to victory.