James Harden had 36 points, 11 assists and eight rebounds to lead the Rockets to their seventh straight win, 122-118 over the Nets on Monday night.
"There's 82 games -- every game isn't going to be perfect," Harden said. "You've got to figure out ways to win, and that's what we did tonight."
"They made some plays and we didn't," Brooklyn coach Kenny Atkinson said. "It could've gone either way."
Jeremy Lin returned to action for Brooklyn for the first time since Nov. 2 when he suffered a strained left hamstring. Although Lin did not start, he played 20 minutes off the bench, scoring 10 points.
Atkinson said Lin's presence on the court helped Brooklyn's offense by keeping the team organized and said he was glad Lin didn't try to do too much following a five-week absence.
"I felt a lot better than I thought I would with my wind, but I struggled with the rhythm," Lin said. "The shots, the feel and getting back out there -- you practice all these shots, but I got in there and it felt like I was shooting a football."
Brooklyn trailed for much of the game until Joe Harris tied it at 118 with a layup with less than 40 seconds remaining.
Gordon gave Houston a two-point lead with a free throw with 11.9 seconds left, and the Rockets came up with a key steal on the ensuing inbound pass. Gordon then made two more from the line and the Rockets held on for the win.
"We were just lackadaisical," Gordon said. "Luckily, we made some plays in the end that helped us win. We definitely need a wake-up call, but we know what we need to do. It's good that we get a win, but there's all the little things that we need to do to be a better team."
The Rockets improved to 7-0 in December while knocking Brooklyn down to 1-5 in the month. The Nets haven't won on the road since Nov. 12.
Houston outscored Brooklyn by five in each of the first two quarters to take a 53-43 lead at the half. Brooklyn cut the lead to five to start the fourth quarter.
"I think we can look at ourselves in the mirror and say individually we could have done a better job, and as a team, we could have done a better job, too," Anderson said.
Nets: C Justin Hamilton missed his second straight game with migraines. Atkinson said he will be reevaluated in a few days. ... The Nets scored 42 points in the third quarter, the team's most points in a quarter this season.
Rockets: Houston allowed 68 points in the paint, a season high for their opponents. ... Harden passed Eric "Sleepy" Floyd (2,363 assists) for seventh on the franchise's all-time assists list. ... Trevor Ariza had three steals and two blocks for Houston.
The Rockets struggled to contain Brook Lopez for the entire game. Rockets coach Mike D'Antoni switched gears and let veteran center Nene play 24 minutes off the bench and starting center Clint Capela less than 19 minutes.
When asked if Nene was a better matchup for Lopez than Capela, D'Antoni didn't hesitate.
"Much better, much better," D'Antoni said. "Nene's more experienced, more bulk. Clint will learn through this stuff, and Brook is a very good offensive player, really good offensive player. They all had their hands full with him."
WRONG PLACE, WRONG TIME
Until he came up with his only rebound of the game with less than 16.9 seconds remaining, Lopez was nearly held without a rebound for the first time since March 26, 2011, when he went without a rebound in 31 minutes against Atlanta.
"I need to be more aggressive getting to the glass," Lopez said. "I'm not trying to make any excuses -- I need to do better in that category."
Nets forward Luis Scola, who played with Houston from 2007-12, was honored by the Rockets after the first quarter as part of the team's celebration of its 50th season. A video tribute featuring interviews from Yao Ming, Tracy McGrady and Shane Battier was played and Scola was given an ovation when shown on the videoboard.
Nets: Host the Los Angeles Lakers on Wednesday night.
Rockets: Host Sacramento on Wednesday night.
This might be the best LeBron impersonation yet
A young LeBron James fan pulls off quite the impersonation of one of the NBA's greatest players.
On this date: Kobe drops 55 on MJ, Wizards
On March 28, 2003, Kobe Bryant scores 42 points at halftime and finishes with 55 points in Michael Jordan's last visit to the Staples Center.
The best moments from MJ's career
Check out the top moments from Michael Jordan's career in both the NBA and college basketball.