Shaun Rooney was the St Johnstone saviour.
The towering full-back’s second half header ensured Dundee were unable to make up any ground in the race for Premiership survival.
Jordan Marshall had fired the Dens Park hosts into an early lead and Saints struggled to work their way into the game.