Jarret Jack's jump shot with 8:03 remaining in the fourth gave the Cavaliers a 93-91 lead and their first advantage since midway through the first quarter. Cleveland increased the margin to four on Dion Waiters' layup with 7:24 remaining.
"Getting down early, we could have folded our tent," Jack said. "But our guys put forth a tremendous effort in the second half."
The Cavaliers began their comeback with a 19-7 third-quarter spurt and got to 78-73 on Irving's two free throws with 3:51 remaining in the period. Jack's jumper with 1:48 left narrowed Miami's lead to 81-78.
Miami built a six-point first-quarter lead and had its first double-digit advantage, 52-42, on Bosh's dunk with 5:15 remaining in the second period. The Heat had an 18-3 run in the quarter and led 68-52 after Wade scored 20 points in the first half.
Bosh scored 13 in the quarter and his layup with 2:11 remaining gave the Heat their largest lead of the half at 62-45.
"You need to credit the Cavs for staying with it, and they got second life and turned it into a heck of a basketball game," Heat coach Erik Spoelstra said. "We were able to make enough plays on both ends and at the very end come away with a win, but that's something we certainly need to work on."
Irving hit two early 3-pointers as the Cavaliers went 4 of 4 from behind the arc in the first 3:15 of the game. His second 3 with 8:15 remaining in the quarter put Cleveland ahead 15-14.
NOTES: Allen's first of two 3-pointers in the third quarter gave him 24,000 career points. ... Heat reserve forward Michael Beasley missed his fourth straight game because of a strained left hamstring. ... Cleveland's bench scored 53 points following Friday night's 60-point performance in Orlando. ... Anderson Varejao's fourth-quarter block gave him 354 in his career, surpassing Jim Brewer for eighth place in Cavaliers history.