The Iceland international, who was playing out of position in central defence, got on the end of Andy Driver's free-kick in the 79th minute to grab the only goal of the SPL clash.
Hearts had been on the back foot for the majority of the half after midfielder Michael Stewart was shown a red card in the 41st minute following a tussle with Hugh Murray.
Despite dominating play because of their numerical advantage, hosts St Mirren failed to register a single shot on target during the 90 minutes.
Hearts started the match positively and immediately went on the attack through Christian Nade. The burly Frenchman did well to get away from Murray but his long-range left-footed shot was easily taken by St Mirren goalkeeper Mark Howard.
Seven minutes later, the Buddies responded with an effort of their own although Will Haining missed the target with his header from Steven Robb's corner.
While Hearts were more composed in their build-up play, the Buddies looked dangerous on the counter-attack and they nearly caught the Tynecastle side off-guard in the 16th minute.
Steven Robb charged up the field and the ball found its way to Gary Mason on the edge of the box, where the midfielder was tackled by Lee Wallace just as he was about to pull the trigger.
Hearts were dealt a blow in the 28th minute when Saulius Mikoliunas was forced off injured with an apparent knee problem.
Robbie Neilson, who was due to feature for the reserves next week, came off the bench to make his first appearance since April following stomach and ankle injuries.
Franco Miranda then went close for the home side with a shot from outside the box that bounced just past Janos Balogh's post.
Tempers flared at the end of the first half when Stewart and Murray were involved in an off-the-ball tussle after the Hearts man had passed the ball to team-mate Driver.
Although referee Mike McCurry and his assistants apparently failed to witness the incident, the official - after a long delay - brandished a red card to Stewart after consulting with fourth official Bobby Madden.
The dismissal of Stewart perhaps influenced St Mirren manager Gus MacPherson's decision to replace Garry Brady with the more attack-minded Andy Dorman at the interval.
Winger Dorman made his presence felt immediately to create a great chance for Billy Mehmet but he was flagged for offside after missing the target.
St Mirren predictably enjoyed plenty of possession at the start of the second period.
However, Bruno Aguiar, in a rare Hearts attack, flashed a shot wide from outside the area to sound a warning.
The Portuguese playmaker was afforded space again on the edge of the box in the 64th minute but, after receiving a pass from Ruben Palazuelos, his effort floated over the bar.
With St Mirren failing to conjure up any clear-cut chances in front of goal, strikers Jim Hamilton and Craig Dargo were introduced to the action.
Large gaps began opening up all over the field as time ran out, encouraging Hearts winger Driver to go on lung-busting runs.
Those forays amounted to nothing, however Hearts took the lead in the 79th minute after Eggert Jonsson bulleted Driver's free-kick low into the net from close range.
Neilson won the set-piece on the far side and Driver's teasing delivery was met in a congested box by the Icelandic star, who usually lines up in midfield but was nudged back to defence today.
St Mirren's cause was helped by five additional minutes but the Hearts defence stood firm.