Ray Allen added 16 points and led a late-game charge for the Heat, who lead the best-of-seven series 2-1. Game 4 is Monday night in Miami.
The Heat trailed by 15 in the first half and never led until early in the third quarter.
Paul George scored 17 points for Indiana, shooting 5 for 13 in his return after being concussed late in Game 2. Roy Hibbert scored 16 points, David West added 13 and Lance Stephenson had 10 for the Pacers.
Miami started the game 2 for 10 from the floor. The Heat then made 21 of their next 31 shots, including eight straight in the third quarter that gave the two-time defending NBA champions their first lead.
James' dunk with 7:36 remaining in the third put Miami up for the first time, 52-51. That was the first of nine lead changes in the quarter, before the Heat did what coach Erik Spoelstra implored his team to do in a pregame locker room address.
''Impose our identity,'' Spoelstra said.
Eventually, the message reached the Heat, and their two best players led the way.
James' 3-pointer with 1:21 left in the third put Miami up 67-63, then its biggest lead of the night. Wade subbed in for James with 5.7 seconds left because the four-time MVP was dealing with what appeared to be a hamstring cramp and connected on a 3-pointer with 1.4 ticks remaining for a 74-67 lead going into the fourth.
James retreated toward the locker room at that point, stopping halfway down the hallway known as ''Championship Alley'' while trainer Mike Mancias stretched him out. Meanwhile, Wade - not exactly known for behind-the-arc prowess - opened the fourth quarter with another 3, the Heat were up 10 and the floodgates were opening.
Indiana got to 76-74 before Allen made a 3-pointer, and with that, the tone was set for the final minutes. Allen made three 3s in the final 5:59, the last of those putting Miami up by 15.
And with that, it became clear that Indiana was going to lose for the second time in Miami this season after leading by 15. It also happened on Dec. 18.
The halftime score looked ugly: Pacers 42, Heat 38.
That didn't even come close to describing how much Miami struggled at times. Here's one example: After 11 minutes, it was Hibbert 10, Heat 10.
Indiana got nine points off turnovers in the opening quarter, led 19-5 with 2:42 left in the period and still held a 21-14 edge entering the second - even though Miami had just peeled off a 9-2 run to make things look at least somewhat respectable.
James started the second quarter for just the seventh time in his 89 games played this season, a sign of how desperate the Heat seemed to not let the game become a total runaway.