In a tightly packed Eastern Conference where just three games separate the second through sixth seed in the standings, every game matters, and that’s doubly true when playing one of those teams. Gordon Hayward and the Boston Celtics were well aware of that entering Tuesday night’s contest in Miami, and they played like it to end their road trip on a high note.

G-Time tallied a game-high 29 points and the Celtics topped the Heat 109-101 in Miami to move within a half a game of the Heat for the third spot in the East.

“It was a big win. I think every game is a big win. They all count the same,” Gordon said. “I think tonight was a good bounce-back win for us as well. I’m proud of the effort and the execution. It was a great win.”

Just two nights after dropping the middle game of the road trip in New Orleans on Sunday, Boston was hot out of the gates in Tuesday’s contest. The Celtics knocked down their first three shots of the game, including a bank shot by Gordon, to establish an early 8-0 lead. Though Miami did finally break the ice on their end, it did little to slow down Boston’s roll. When Gordon buried a three just two-and-a-half minutes into the contest, the Cs went up 13-4.

The Heat scored the next six points, but No. 20 followed with a pair of drives to the bucket on back-to-back possessions, converting each to push the lead back to seven.

G later added a free throw and accounted for 10 of Boston’s first 18 points, matching Miami on the scoreboard on his own through the first six minutes of action. He ended the first frame with 11 points and the Celtics led 36-28 after one.

The Heat pushed back in the second and by the time Gordon returned to the floor the lead was just three. Miami even briefly took the lead, but G-Time made short that advantage was short-lived when he knocked down a fadeaway jumper to make it 42-41 Boston. After a three by Miami’s Goran Dragic put them back in front, the Celtics scored the next seven points and eventually went into the break with a five-point edge 53-48.

The third quarter was another back and forth slugfest but after halftime, the Cs maintained a lead for the rest of the night, keeping Miami at arm’s length by penetrating their defense on one end, and stifling the Heat on the other. As a team, Miami shot just 37 percent from the field while the Celtics were near 50 percent all night, including better than 55 percent inside the arc. After the game, Gordon talked to the media about what Boston did to break the Heat’s zone defense.

“The key was trying to get the ball into the middle there,” he said. “They do a good job. Their big guys are up. It’s a lot different than most zones, so sometimes it’s hard to see and they make you kind of hold the ball up at the top. It stifled us there for a little bit, but we started to get into the teeth of the zone there and we were getting easy stuff.”

No. 20 broke into the zone early in the third quarter where he hit another fadeaway in the first minute for the opening salvo of the second half. One of the keys for Gordon all night was grabbing the ball off the defensive glass and starting the Celtics out in transition, then finishing on the other end. He did just that again midway through the quarter to put Boston up eight. A few minutes later, G-Time was on the receiving end of a lob from Marcus Smart which he threw down with authority to make it 71-64.

The Heat scored the next five points to claw about as close as they would get to the lead in the second half, back within two, but a well-timed setup from Kemba Walker gave Gordon room to hit up a pull-up jumper to double the lead. He added a couple free throws late in the third, bringing his total points for the game to 23 as the Celtics took a four-point lead into the fourth.

From there, Boston’s second unit dropped the hammer on Miami in the early stages of the final quarter, pushing the Celtics’ lead to double digits for the first time since the opening quarter. Miami made one last run at it by inserting their starters earlier than expected in the fourth, but Boston continued to hold them off. Gordon’s final bucket of the night once again came from inside the zone as he knocked down one more fadeaway with a trip to the bank to put the Cs up 99-91 with just over four minutes to go.

As the game ticked toward its conclusion, Smart buried a huge trey to push Boston’s lead back to eight with under two minutes to go and the Celtics closed the game at the line, where Gordon hit 4-of-4 and Smart added a pair to seal the win.