Callum Davidson's team had suffered consecutive late 1-0 home defeats and he must have feared it was another of those days as his players passed up chance after chance against a visiting side who struggled to get a grip on the game.
But May converted Craig Conway's low cross in the 72nd minute to earn Davidson his first home win as manager.
St Mirren boss Jim Goodwin responded to the suspension of centre-back Joe Shaughnessy by bringing in left-winger Ilkay Durmus and playing with three at the back.
The hosts made a straight swap following Liam Craig's red card against Hibernian, bringing in David Wotherspoon into the centre of midfield, and they emerged better from the enforced changes.
The visitors were sloppy from the start. Centre-back Conor McCarthy got away with dithering on the ball shortly before being caught in possession by Callum Hendry. Jak Alnwick came to the defender's rescue with an excellent one-handed stop.
Michael O'Halloran found space 25 yards out and was not far off target and the home side were faring well down the right. O'Halloran's dangerous low cross caused panic, Conway fired over from Danny McNamara's cutback and Scott Tanser volleyed over from Jason Kerr's cross.
Goodwin pulled midfielder Sam Foley back to form a back four but still was not satisfied and replaced Kyle McAllister with Cammy MacPherson in the 38th minute to add some steel to the midfield.
The chances kept coming though. Hendry missed the target from McNamara's cross and Alnwick made a good stop from Kerr's header before Tait slid in to block Liam Gordon's follow-up, with referee Kevin Clancy waving away handball claims.
Goodwin brought on new signing Dylan Connolly for Junior Morais at the break but he was forced into another change inside five minutes when defender Marcus Fraser went off with a head knock. The Buddies boss reverted to a back three and brought on striker Kristian Dennis.
The Perth side soon created another chance when Gordon headed wide from McNamara's long cross.
St Mirren improved in possession without making any inroads on the home goal and the Perth side finally made the breakthrough after Wotherspoon fed Conway on the left wing. The former Scotland winger delivered a low cross and May slid in to turn the ball home from six yards.
St Mirren took almost 80 minutes to muster any effort at goal before getting two on target in the space of 60 seconds. Elliott Parish went from bystander to key player as he comfortably held attempts from Dennis and Jon Obika.
Alnwick kept the visitors in it with a brilliant stop from McNamara and Davidson's side comfortably avoided another late blow.