The back story occurred some three minutes prior to Marion's emphatic slam, as Mario Chalmers athletic reverse layup put Miami back in front, 87-86, after a furious Chicago rally capped by six successive points had given it the lead.
Dwyane Wade then took over, sporting an American flag bandage on his cheek and draining three straight shots to put the Heat in a comfort zone, up 93-86 with only 1:12 on the clock.
Wade scored 24 points with seven assists on the night, with his last assist the most important of all.
Derrick Rose, who scored 18 points with six assists, made two free throws and Tyrus Thomas converted a slam following a Wade miss from in close for a 93-90 game with 35 seconds left.
Thomas registered 15 points and eight boards on the night.
Wade missed again on the other end, and Gordon's ball fake inexplicably drew a three-shot foul with 6.5 ticks to play. The guard poured home the final three of his 34 points to tie the game.
The teams then exchanged turnovers in the next two-plus ticks, setting up the Heat with a chance to win with just over three seconds on the clock. Marion in-bounded the ball to a quickly doubled Wade, who then threw a deft bounce pass to the cutting Marion, and he in turn slammed it home with 1.1 seconds left.
Thomas' heave at the buzzer went over the backboard.
Wade received plenty of help as four other teammates reached double figures. Rookie Michael Beasley scored 21 points with seven boards off the bench, Daequan Cook added 14 points, Marion scored 12 with seven boards and Udonis Haslem posted a workmanlike 10 points and seven rebounds.
The Heat snapped a three-game road losing streak with the win and hit the All- Star break with a 28-24 record.
Chicago didn't get much offensive firepower from anyone other than Thomas, Rose or Gordon. Luol Deng was a pedestrian 2-of-6 for six points, Kirk Hinrich scored just eight in just under 27 minutes and Joakim Noah made only one field goal, yet grabbed 11 rebounds.
The Bulls split a quick two-game homestand and enter the break with a 23-30 mark.
Chicago led 24-23 after one period before scoring just 15 points in the second, falling behind 50-39 after 24 minutes of game action. The Bulls didn't pick up any momentum in the third, but did score 10 of the first 12 points in the final period to quickly draw close.