RYAN STEVENSON'S glory double kept Ayr on course for the title but Scott Walker and Dean Keenan were defensive giants in the Gayfield sunshine.
United's eighth win from tenunbeaten games wasn't without its scares as Arbroath battled back to cancel out Chris Aitken's penalty.
But then in stepped Stevo with two sizzling strikes in a three minute spell to turn the game and inch Ayr ever closer to their championship dream.
Happy boss Brian Reid revealed: "There is never a doubt about our fighting spirit and we proved it yet again. A lot of teams would have let the heads go down after losing the lead but we got straight back into it and scored two cracking goals to win it.
"In the first-half we never played how we could but I had words at half-time and in the second-half we were far more like ourselves. At this stage of the season, it's all about getting results and that's another one ticked off.
“ We just need to worry about ourselves. We have players with the finishing ability to score so if we can keep it tight at the back, we've always got chances of scoring and that's how it worked out today."
Injuries ruled out Neil McGowan (groin) and Ryan Borris (shoulder). And there was a further blow after 20 minutes when Martyn Campbell hobbled off to be replaced by Ally Woodburn.
That forced Keenan to switch to central defence, a position he had filled on occasion at Morton and the gritty lion heart was immense. Alongside the commanding Walker, he formed a formidable defensive rock that gave Ayr the cornerstone to win the game in the second-half.
Stephen Grindlay was in early action, saving a fierce shot from Barry Sellars and then tipping over an effort from Bryan Scott. Ayr's response was a David Gormley run and cross which was headed behind by Alan Rattray. Then Willie Easton's inswinging corner was palmed away by keeper Darren Hill.
For a while, Ayr lost their way after Campbell's forced exit and Sellars smashed a shot off the post before Scott headed wide.
Four minutes after the interval, Walker had to backtrack and put in a superb tackle on Scott who had raced clear. But two minutes later, Ayr got the goal they needed.
Kenny Connolly had his shirt pulled by Steven Rennie for a stonewall penalty which skipper Aitken confidently converted. Hill and Keith Gibson were booked for dissent.
In the 65th minute, Mark Roberts replaced the injured David Gormley and he was to make a big impression. But not before Arbroath grabbed a shock equaliser, Jamie Bishop bulleting home a header from a Sellars corner.
Ayr were stunned but only seven minutes later they were level. Woodburn fed Alex Williams who laid the ball off for Stevenson to turn and smash home a spectacular effort.
As the fans behind the goal upped the atmosphere, Stevo did it again two minutes later, sealing the points with his tenth goal of the season. This time, Woodburn slipped the ball to Aitken and his cross was bulleted home by Stevo for a stunning game clincher.
Bryan Prunty replaced Williams with seven minutes to go and Ayr came close to a fourth when Aitken curled a free-kick into the sidenet.
STAR MEN: ***Scott Walker; **Ryan Stevenson; Dean Keenan.
ARBROATH - Hill; Rennie, Forsyth, Raeside, Rattray (Bishop 34), Dobbins, Lunan, Gibson (Ross 77), Scott, Sellars, Weir (Watson 59). Unused subs: McMullen, Morrison; Booked: Hill, Raeside, Gibson, Weir.
AYR - Grindlay; Keenan, Walker, Campbell (Woodburn 20), Dempsie; Connolly, Stevenson, Aitken, Easton; Williams (Prunty 83), Gormley (Roberts 65). Unused subs: Agnew, Mitchell; Booked: Gormley.
Referee - Steven Nicholls; Crowd - 821.