The Highlanders seemed to be swatting away the Wasps with relative ease, with Aaron Doran netting his 11th goal – and fourth in four games – to break the deadlock.
Sean Welsh scored a penalty and Jordan White, with his 14th of the season, looked to have killed it as a contest just after the hour.
But Alloa, now with eight defeats from their last nine matches, mustered two goals in the final 11 minutes but remain three points adrift at the foot of the table.
Despite decent momentum in the league, John Robertson’s men had it all to prove. They had won only three matches at home all season in the Championship, while drawing both meetings with bottom-of-the-table Wasps.
However, there was an assurance to their performance in the first half, with keeper Mark Ridgers barely troubled.
At the other end, Coll Donaldson drove just high and wide, while Liam Polworth was also off target.
The home breakthrough came after 28 minutes from the in-form Doran. Sean Welsh delivered a diagonal ball into the penalty box from the right and the Irishman, pictured, executed a brilliant head-flick into the far corner of the net from fully 15 yards.
From the restart, only a desperate saving challenge by Liam Dick denied striker Jordan White in front of goal from Welsh’s through pass.
Soon after, White was bumped over by Iain Flannigan inside the area and Welsh blasted the 35th-minute penalty straight down the middle.
Caley Thistle still needed a third to kill it and, just after the hour, Liam Polworth threaded White through the middle to dink it over the keeper.l.
Worryingly for the hosts, Welsh limped off in some pain after 77 minutes.
The visitors earned a consolation when Jamie McCart knocked over Alan Trouten and the Wasps’ attacker stuck away the 79th minute penalty.
Then Iain Flannigan’s late strike took a wicked deflection past Ridgers to make it a nervy finish for Inverness.