Danny Hylton and Cameron Jerome hit Luton Town's second-half goals to move the Hatters up to eighth in the Championship, two points off the play-off places.
On his second return to the Bet 365 Stadium since being sacked in November 2019, after just 10 months in charge, ex-Potters boss Nathan Jones had a much happier night.
But Luton still had to endure a fraught finale when Lewis Baker curled home a beauty to pull one back two minutes into injury time.
Luton had just gone close on the break when Harry Cornick got down the right and pulled back into the danger zone, only for Joe Allen to slide in and deny Allen Campbell with a superb cover tackle.