The striker put his spot-kick down the middle after Michael O’Halloran was fouled in the box eight minutes from time by Chris Chantler.
Kilmarnock will feel hard done by having dominated the game but spurned a host of opportunities.
Killie were quickest out of the blocks and forced Saints ‘keeper Alan Mannus into making a fine save to keep out Tope Obadeyi’s effort inside the opening minute.
The hosts continued to bombard the visitors’ goal with Josh Magennis’ shot deflecting over, while Robbie Muirhead then fired a long-range effort wide.
They were nearly punished for not taking their chances midway through the first half when former Everton striker McFadden’s half-volley was cleared off the line by Mark Connolly.
McFadden went close again with a low effort soon after but was denied by a fine save by Craig Samson.
But the visitors’ hopes of victory were dealt a blow when McFadden limped off at the start of the second half and was replaced by Lee Croft.
And the home side continued to press with Chantler’s vicious effort parried by the ‘keeper, while Muirhead’s rasping, curling shot went inches wide.
But the turning point came on 82 minutes when Chantler was penalised despite the home side’s protests and Graham smashed his spot-kick in to secure the points.
The win for the Saints sees them climb into sixth place while Killie drop to seventh spot.