The Knicks (1-5) gave Gordon and the Celtics all they could handle on Friday night at TD Garden, but Jayson Tatum drained a deep and contested shot over rookie R.J. Barrett with just 1.3 seconds remaining to earn the 104-102 victory — extending Boston’s winning streak to four games.

“That was huge. I knew he had it in him, I think our whole team had confidence in him. What a huge shot,” Hayward said of Tatum’s first NBA game-winner.

Gordon finished the outing with 13 points, nine boards and four assists, one of which was a beautiful bounce pass to Marcus Smart for two.

Kemba Walker led all scorers with a season-high 33 points. This is the second straight game the first-year Celtic surpassed 30 points in a game. Kemba also added five assists and six rebounds to the stat sheet in a dazzling performance.

Despite being 4-1 and not suffering a loss since opening night, G-Time believes there is always room to improve.

“I think what stood out to me is just that we still have so much more room to get better,” Hayward said. “I don’t think that we have played our best basketball, certainly haven’t played a full 48 minutes. We’ve had stretches, halves that we’ve done really well. But we’ve also had halves where we’ve been pretty bad. So, I think just that’s what stood out. We’re finding ways to win which is good, but we still have a lot of room to improve, a lot of areas that we can get better.”

Fortunately, the Celtics have continued to pile up wins in the early part of the season as they continue to mesh together as a team.

The Celtics will get that chance to improve and play a full 48 minutes when they return to action Tuesday night as they take on the Cavilers (2-3) to start a three-game road trip against Cleveland, Charolette and San Antonio. Tip-off is at 7 pm ET.