The win also means that Ayr have closed the gap with Raith Rovers as they go into 2009.
The re-arranged fixture only attracted just over 500 fans as the two of the leagues top three battled out an important promotion match.
United started better when in 18 minutes, a header from Martyn Campbell was cleared off the line by Charlie King.
Four minutes later, King again cleared off the line, this time from a Scott Walker header.
The teams went in 0-0 at half time with Ayr feeling more confident after a poor 3-0 defeat at Peterhead the previous week.
It took a David Gormley cross to United marksman Bryan Prunty on the hour mark to make the difference. Prunty's flick home settled the match and open up a five point gap on the third placed Brechin City.