The result spoiled Robert Douglas’s 499th senior game, and the veteran goalkeeper was kept by far the busiest throughout in front of 1803 at Station Road.
Michael O’Halloran and James Dunne struck their first goals for the visitors as the Perthshire side bounced back from their League Cup disappointment.
Saints were determined to lift the gloom following their semi-final loss to Aberdeen and first-half goals from May and Frazer Wright set them up for a comfortable fifth-round triumph at Station Park.
The League One side hit the frame of the goal twice but O’Halloran came off the bench to net his first goal since his January move from Bolton and on-loan Stevenage midfielder Dunne completed the scoring with a debut strike.
Prolific goalscorer May had the first chance but his close-range effort was blocked by home defender Stuart Malcolm.
Martyn Fotheringham was unfortunate for the home side in the first half as his close-range shot hit the post.
The game was a tight affair at this stage but May fired Saints into the lead 25 minutes in after latching on to a Lee Croft corner and sending the ball bouncing straight past home goalkeeper Rab Douglas.
With just under five minutes of the half left to go, the visitors increased their lead when a Gary McDonald ball was pushed away by Douglas only for defender Wright to head home.
McDonald found the net with less than a minute to go until half-time but the goal was disallowed due to a foul.
The battling Loons nearly hit back when Odmar Faeroe sent a stunning right-footed strike from 30 yards only to see it hit the bar less than a minute into the second half.
The home side dominated most of the opening stages of the half but a David Wotherspoon attempt 53 minutes in sailed over the top of the bar for the visitors. Moments later another Wotherspoon attempt suffered the same fate.
O’Halloran was booked for a foul and Iain Campbell stepped up to take the subsequent free kick which seemed to struggle for power in the ever increasing windy conditions before being pushed away by Steve Banks.
Just after the hour mark O’Halloran made it 3-0. Croft crossed in only for Douglas to palm the ball away before the former Scotland Under-21 striker latched on to it from close range and fired in.
May could have made it four moments later but Douglas saved well before a Chris Templeman shot for Forfar from long range did little to trouble Saints goalkeeper Banks when it trundled past the post.
A minute later a strong left-footed shot from Gavin Swankie went straight into Banks’ arms and substitute Dunne completed the scoring in the 80th minute when his shot went in off the post to give former Celtic goalkeeper Douglas no chance.