With the score tied 96-96 and 25 seconds remaining, Gordon corralled the ball after an O.J. Mayo miss and dribbled past the Mavericks' Darren Collison, who fouled him as he put in a shot from just beyond the free-throw line.
Gordon (14 points) also knocked down the free throw with 17.9 seconds left for a three-point New Orleans advantage.
Mayo had a chance for a score-tying 3-pointer, but mishandled the ball, and Vince Carter's try at the buzzer bounced off the rim, securing the Hornets' first win in three games.
Greivis Vasquez supplied 25 points, nine assists and seven rebounds for New Orleans.
The Mavs got 20 points from Dirk Nowitzki and 19 from Carter.
Beautician charged with giving client fatal silicone butt injection
Attkisson leaves CBS News, reportedly over network's 'liberal bias'