The Caley Jags sit fourth, only behind Ayr on goal difference, going into the last league match of the season next week.
John Robertson made three changes to the side which lost 2-0 to Dundee United last week as Kevin McHattie, Brad Mckay (suspended) and Tom Walsh were replaced by Carl Tremarco, Coll Donaldson and Anthony McDonald.
After a tight start, Liam Polworth found Jordan White in the middle after 16 minutes but his effort was wide.
Cammy Mackay was called into action after the 23rd minute, as Zanatta slotted in Aitchison but it was a brilliant save from the Caley Thistle goalkeeper.
Alloa were awarded a penalty after 27 minutes as Donaldson was judged to have fouled Zanatta in the box. The replay showed it was a soft call.
Alan Trouten stepped up and slotted the penalty past Mackay to make it 1-0 to the hosts.
John Robertson made two half-time subs as Liam Polworth, who was struggling with a knock, and Anthony McDonald were replaced by Nathan Austin and Darren McCauley.
It was almost all square straight after the re-start as Trafford’s corner found Rooney in the middle and his header was cleared off the line.
Alloa had a good chance after 54 minutes as Aitchison cut the ball back to Trouten but he fouled Coll Donaldson while getting his effort away.
It was all square after 68 minutes though as Joe Chalmers’ cross at the byline found Shaun Rooney just inside the box and his half-volley founds it’s way into the bottom corner.
Tom Walsh make his way on for Aaron Doran.
The turnaround was complete five minutes later, as Charlie Trafford met Joe Chalmers’ corner at the front post and prodded the ball past Neil Parry to make it 2-1 to the Caley Jags.
Carl Tremarco was struggling with a calf injury and had to leave the pitch after the celebrations of Trafford’s goal. With ICT making all three subs, they were down to ten men for the remaining stages of the game.
Alloa began to pile the pressure on and on the 81st mintue Cammy Mackay just kept out Jordan Kirkpatrick’s effort and Hamilton couldn’t get to the rebound.
Zanatta then out an effort wide on the 88th minute and Alloa had a huge chance in the 90th minute through Connor Sheilds but was denied by a massive save from Cammy Mackay
Caley Thistle held onto the three points and now they know if they better Ayr’s result next weekend then they can finish third.