The visitors dominated early possession and almost took the lead in the fourth minute when Erskine drew a fine save from Marian Kello.
But that seemed to spring St Mirren into life with John McGinn, Jason Naismith and Ross Caldwell all going close.
Nadir Ciftci had an opportunity to put Dundee United in front just after the half-hour mark but his turn and half volley failed to trouble Kello.
The sides went into the break goalless but a fast start after the interval saw Dundee United take the lead on 47 minutes.
Erskine drilled a shot low and hard from outside the box which beat Kello to the bottom right corner of his net.
St Mirren forced a succession of corners after the goal but neither Jeroen Tesselaar nor Kenny McLean could get them back on level terms.
And they were made to pay for their inability to capitalise when Fojut netted his first goal in a Dundee United shirt when he powered in a close-range header from Gary Mackay-Steven’s cross.
Substitute Spittal sealed the win in the 86th minute when he fired a shot in the top-right corner of the net as Dundee United consolidated third place in the table.