Anderson's long-range shot came with 1:11 to go in the extra period and put the Pelicans in front for good at 105-103.
New Orleans snapped a two-game skid and handed the Pistons their third straight loss.
Neither team could score during the final 1:15 of regulation after Josh Smith's basket lifted Detroit into a 96-96 tie.
Anderson scored eight of his 22 points in overtime while Jason Smith also had 22 points to go with 16 rebounds. Jrue Holiday pitched in 19 points and eight assists for the Pelicans.
Greg Monroe led Detroit with 28 points and 10 rebounds.