Anderson Varejao scored 18 points and added nine rebounds for Cleveland, which had lost five of its last six games.
Ray Allen returned from an ankle injury and scored 22 points, making 4 of 6 from 3-point range. But he missed a jumper from the left corner when Boston still held a one-point lead on its second-to-last possession.
Paul Pierce scored 18 points with six rebounds and five assists for the Celtics, who had won four in a row.
Boston led 87-76 before Cleveland scored eight straight points, including two layups by Varejao, to make it 87-84 with 98 seconds left. After a timeout, Pierce missed a finger role and Alonzo Gee, who was hacked trying to score on an offensive rebound, sank a pair of free throws to make it a one-point game.
Allen missed from the left corner, and Kevin Garnett grabbed the rebound but traveled. Irving missed for Cleveland and Varejao got the rebound out to Antawn Jamison, who missed a 3-pointer. Boston's Brandon Bass got the rebound but Gee knocked it loose, Varejao went to the floor to corral it and called a timeout.
Irving dribbled down the clock near midcourt, then drove to the basket, spun and laid it in to give Cleveland its first lead in almost 20 minutes.
Pierce got the ball on the inbounds pass and was fouled. He got the ball again on the restart, took one dribble and got off a shot that bounced off the rim as the officials waved it off anyway.
Boston fell to 4-2 since point guard Rajon Rondo went out with a right wrist injury. The Celtics were also without Allen for three games with a sore left ankle.
The Celtics had beaten the Cavaliers twice in a row and five times in their last six meetings, including the last three games of a second-round playoff series in 2010 that was LeBron James' swan song in Cleveland.
Boston led 44-43 at halftime. Cleveland led 55-53 early in the third quarter before Allen hit a 3-pointer to give the Celtics the lead for good and start them on a 14-2 run that gave them the first double-digit lead of the game for either team.
Notes: Cleveland G Anthony Parker had back spasms and did not play in the second half. ... Irving made his first six shots. ... Celtics point guard Avery Bradley went to the locker room in the third quarter with a rolled ankle. He had it retaped and returned to the game. ... The Celtics held a moment of silence for former Boston mayor Kevin White, who died on Friday.