The Pistons owned a 96-89 lead at the four-minute mark, but collapsed down the stretch to suffer their third straight loss.
New Orleans moved in front at 101-98 with 30 seconds to play on a pair of free throws by Anthony Morrow. Detroit then came back to tie it on a free throw from Rodney Stuckey and a layup from Josh Smith with 22 seconds left.
Gordon took the ball after a time out and made a spinning move to get into the lane. His floating layup sailed over Smith's outstretched arms for the winning basket.
Morrow scored 21 points off the bench to lead the Pelicans, who won for just the second time in 11 games. Gordon had 15 and Anthony Davis contributed 14.
Brandon Jennings scored 28 points and had seven assists for the Pistons.
Swim Week Miami Beach 2014 [PHOTOS]