ORLANDO, Fla. — The Boston Celtics couldn’t cool down Terrence Ross in the second half, and it cost them the game.

Aaron Gordon had 28 points and 12 rebounds, and the Orlando Magic held off a late rally to beat the Celtics 105-103 on Saturday night.

Ross added 25 points, 18 in the second half, and Celtics Coach Brad Stevens said he was the difference.

“Terrence Ross changed the whole game,” Stevens said. “When a guy catches fire, you’ve got to slow him down. We didn’t get into his air space good enough, and when we did, we fouled. When Ross got going, it opened everything up.”

Jayson Tatum missed a jumper at the buzzer that would have tied it for the Celtics, who charged back from a nine-point deficit in the final 1:43 before losing to the Magic for the second time this season.

Kyrie Irving scored 25 points for the Celtics, 10 of them from the foul line in the final 4:31. He appeared frustrated afterward with Gordon Hayward, who inbounded the ball on Boston’s final possession.

“Next question,” Irving said when asked about his reaction. “J.T. got a good look, so let’s move on.”

Nikola Vucevic had 16 points and 13 rebounds for Orlando, which broke a four-game losing streak. He missed the second of two free throws with 3.2 seconds, leaving the Celtics with a chance to win or tie. Tatum took the inbounds pass and missed a 21-footer.

“Any time you have a shot to win at the end, that’s all anybody focuses on,” Stevens said. “That stretch at the end of the third and early fourth is what really gave them the momentum.”

Boston fell behind 29-21 early in the second quarter after going 5 minutes, 45 seconds between field goals. But Jaylen Brown hit a couple 3-pointers, and Tatum and Marcus Smart each hit one as the Celtics went on a 23-5 run and led 51-41 at halftime.

Boston led 61-53 when Tatum went to the bench with four fouls midway through the third quarter. Vucevic and Ross scored nine points apiece in the quarter and Ross hit a 3-pointer in the final second to help Orlando cut the deficit to five.

“Obviously, Terrence was instrumental there. When he gets going he doesn’t need a lot of space,” Magic Coach Steve Clifford said.

Ross and Gordon then combined for 14 points in a 19-4 run that gave Orlando a seven-point lead with 5:57 remaining.

“That was huge,” said Gordon, who made all 13 of his free throws. “Hopefully the next time the Celtics come to town, we’ll have more of a home crowd.”

It was Boston’s only visit of the season to Orlando.