Rajon Rondo scored a career-high 35 points and added six assists and five rebounds for the Celtics, who were playing without Kevin Garnett due to a hip flexor, but it was not enough for Boston to avoid its third loss in four games.
The Pistons trailed, 49-47, at the half and stayed within two possessions for the entire third quarter until closing out the frame with six straight points to hold a 73-72 advantage at the end of the third.
Detroit then carried that momentum into the fourth quarter, opening the final stanza with a 14-4 run that included three three-pointers by Gordon to jump out to an 87-76 lead.
The Pistons increased their lead to 93-80 before Boston reeled off six straight points to make it a 93-86 game with less than two minutes remaining in the contest.
But Gordon put a halt to the spurt with his fourth three-pointer of the quarter and Detroit held a double-digit lead for the rest of the game.
Detroit recorded the first six points of the game and kept the Celtics at arm's length until Boston ripped off a 10-0 run that included seven straight points by Rondo to jump ahead, 16-12.
The Pistons responded with a 6-2 spurt to tie the game at 18, and a back-and- forth final four minutes of the first ended with the Celtics taking a 28-26 advantage into the second quarter.
It remained a close game in the second, as neither team took a lead larger than three points until an 8-2 swing by the Celtics put them ahead, 45-38, with 2 1/2 minutes left in the half.
Detroit, though, answered with a 9-2 run to tie the game at 47 within the final minute before a Chris Wilcox jumper gave Boston a 49-47 edge at the break.