Gretna, who were relegated after going into administration in March, had drawn their last three outings but they were no match for Craig Brewster's side.
The Highlanders went in front with barely 37 seconds on the clock when Tokely released Cowie on the right and his cross was finished well by Imrie 12 yards out.
Gretna responded with Danny Hall's effort from 25 yards, but the midfielder's shot flew over the crossbar.
In an otherwise tame opening, Craig Barr and McAllister were booked after clashing following a foul by the Gretna defender on 21 minutes.
Inverness doubled their lead three minutes later when Marius Niculae's header from Wilson's cross was well saved by Fleming only for McAllister to nod home the rebound.
Gretna reduced the deficit in the 27th minute when Tokely fouled Kyle Naughton and from the resultant free-kick, Brendan McGill crossed for Hogg to head past Zibi Malkowski.
Please turn on JavaScript.
Media requires JavaScript to play.
The home side opened the second half in style with Wilson's goal in the 51st minute, the veteran using the outside of his boot to beat Fleming from 20 yards.
Ian Black's long-range volley went narrowly wide and Niculae had an effort blocked by Barr as Caley continued to exert their authority.
Imrie then cut back for Cowie to volley powerfully into the net on 70 minutes.
One minute from time, Tokely rose to head Vigurs' corner into the net.
And Vigurs rounded off a fine win with a left-foot volley from Roy McBain's cross two minutes into injury time.
The victory completes a clean sweep of victories for Brewster's side over Gretna this season.
Inverness CT:
Malkowski, Tokely, Proctor, Hastings, McBain, Wilson (Vigurs 81), Black (Kerr 86), Cowie, Imrie, Niculae, McAllister (Bayne 65).
Subs Not Used: Fraser, Hart, Duncan, Wyness.
Booked:
McAllister.
Goals:
Imrie 1, McAllister 24, Wilson 51, Cowie 70, Tokely 89, Vigurs 90.
Gretna:
Fleming, Barr, Meynell, Griffiths, Skelton, Deverdics, Hall (Wilkinson 62), Hogg (Taylor 69), McGill (Fisher 82), Osman, Naughton.
Subs Not Used: Sharples, Murray, Robinson, Schultz-Eklund.
Booked:
Barr.
Goals:
Hogg 27.
Att:
3,639
Ref:
I Brines
BBC Sport Player Rater man of the match:
Inverness' Don Cowie and Barry Wilson 9.00 (on 90 minutes).
Please note that you can still give the players marks out of 10 on BBC Sport's Player Rater after the match has finished.