Jason de Vos converted Ipswich's dominant play in the 41st minute only to see Wayne Thomas equalise three minutes later with a header.
Ian Westlake put Ipswich back in front with a strike in the 62nd minute but Thomas rose again to level the scores.
Stoke had John Halls sent off for two rash challenges but Ade Akinbiyi tapped in after 85 minutes to steal the win.
Ipswich boss Joe Royle:
"I'd have been disappointed with a point and we've come away with nothing.
"It's totally our own fault. Defending poorly on the same corner twice and on the same person, although the keeper was fouled in the first one.
"We didn't keep the ball, were non-existent in midfield and individually poor defensively."
Stoke: de Goey (Simonsen 58), Halls, Thomas, Taggart, Hall, Henry, Brammer (Guppy 67), Russell, Clarke, Noel-Williams (Asaba 86), Akinbiyi.
Subs Not Used: Hill, Greenacre.
Sent Off: Halls (82).
Booked: Clarke, Akinbiyi, Halls.
Goals: Thomas 45, 75, Akinbiyi 85.
Ipswich: Davis, Diallo, De Vos, Naylor, Wilnis (Bowditch 86), Miller, Horlock, Magilton, Westlake, Bent, Kuqi (Counago 60).
Subs Not Used: Richards, Dinning, Price.
Booked: Naylor, Horlock.
Goals: De Vos 41, Westlake 62.
Ref: M Dean (Wirral).