Jaylen Brown added 17 points and Derrick White 16 in a 116-99 win for the Celtics, who would have been eliminated with a defeat.
The second seeds trail 3-1 in the best-of-seven series going into game five tonight.
“Now we just have to go win another one, that’s all that matters,” said Celtics guard Marcus Smart.
No team in NBA play-off history has ever recovered from a 3-0 deficit to win a series.
“We’re taking one game at a time,” Smart added. “We understand that the odds are stacked us, but we’re a team that believes in us no matter what, and all that matters is the next game.”
Celtics coach Joe Mazzulla, who blamed himself for their below-par display in their 128-102 loss in game three, added: “We have to keep that same level of intensity, same mindset, same focus for the next game.”
Jimmy Butler scored 29 points in reply for the Miami Heat, who are hoping to become just the second eighth-seeded team to advance to the NBA Finals after the New York Knicks in 1999.
“We have to play like our backs are against the wall,” said Butler. “All year long, we’ve been better when we have to do things the hard way.”
Caleb Martin, who added 16 points off the bench for the Heat, said: “It’s definitely disappointing. That would have been a perfect situation [to end it]. Everyone knows we typically don’t get things the easy way.”
The winners will play the Denver Nuggets after they completed a 4-0 Western Conference championship sweep over the Los Angeles Lakers.