Carrick opened the scoring when Jordan Forsythe's excellent long ball released Heatley, who lifted the ball over Alex Henderson before racing forward to head into the net.
Dungannon responded quickly as Jamie Glackin picked out Dillon, who drove into the area and fired a low finish into the corner.
However, Carrick regained the lead after 20 minutes when captain Crowe turned home Aidan Steele's low delivery following a corner.
The visitors continued to threaten, with Gibson twice having efforts ruled out for offside, while Nathan Gartside produced an excellent diving save to deny Adam Glenny's header.
Carrick extended their advantage just before half-time when Benjamin Buchanan-Rolleston's dangerous cross deflected off Wallace and rolled into his own net.
Heatley struck the crossbar after the restart before Gibson made it 4-1, reacting quickest to slot home after Adam Lecky flicked on Forsythe's free-kick.
McAllister almost pulled one back when his powerful effort clipped the crossbar, but Dungannon eventually reduced the deficit after Corey Smith was brought down inside the area.
McAllister converted the resulting penalty after 79 minutes, sending Gartside the wrong way.
The Swifts continued to push forward in the closing stages but could not find another breakthrough as Carrick held on for an impressive away victory.