After trailing for the entire fourth quarter, the Heat went ahead for good on James' layup with 18 seconds remaining.
The Miami superstar also hauled in 10 rebounds and dished out six assists while Chris Bosh contributed a double-double of 24 points and 10 rebounds for the Heat.
Dwyane Wade added 19 points, seven rebounds and six assists in the victory.
James Harden (22 points) missed a potential game-tying 3-pointer at the buzzer for Houston, which fell to 0-3 at home.
Chandler Parsons paced the Rockets with 25 points.
McPhee, Cokas 'working on their marriage' after affair
Beautician charged with giving client fatal silicone butt injection