Top scorer Wells pounced after 12 minutes when on-loan defender Zeki Fryers made a mistake on the edge of his own box and the Bermuda cap curled a neat shot into the bottom-left corner from 18 yards out for his 13th goal of the season.
Huddersfield went two up on the half-hour mark when Jacob Butterfield chipped a cross for James Vaughan to send a header looping over Bartosz Bialkowski, while Luke Varney pulled one back for Ipswich just after the break in a high-tempo enthralling end-to-end contest.
The Terriers had not won since a 3-0 win over Reading on February 24 – which was the last time Wells scored – with their promotion-chasing opponents looking for a third win in four matches.
Daryl Murphy forced Huddersfield keeper Alex Smithies to save his header from a Richard Chaplow corner after 18 minutes.
Fryers appeared to bring Sean Scannell down in the box two minutes later but referee Tony Harrington waved away Huddersfield appeals for a penalty.
Vaughan then injured himself with a spectacular over-head kick which drew a good save from Bialkowski. Seconds later Ipswich top scorer Murphy almost added to his 23 goals this season as play swept down the other end.
Varney flicked on a Jay Tabb long ball and Murphy pounced to round Smithies and shoot – only to see Huddersfield defender Tommy Smith clear off the line.
Ipswich boss Mick McCarthy made a double substitution at half-time in a bid to turn the game. Teddy Bishop and Freddie Sears came on for Chaplow and Chris Wood and it paid immediate dividends.
Varney, on loan from Blackburn, crashed in a header after 48 minutes from a Tabb cross from the left. And there was almost an instant equaliser when Christophe Berra forced Smithies into a good save from another Tabb cross.
Pole Bialkowski, who made several key stops in the 1-1 draw with Bournemouth, then made a reflex double save from a Huddersfield corner.
He first blocked a Mark Hudson shot after 52 minutes and was then up smartly to turn away the rebound from Vaughan.
More home pressure saw Berra block a shot from Wells just before the hour after the striker was put through by Scannell.
Straight from that Ipswich went on the attack and nearly levelled when Sears had a shot from the left side of the box saved by Smithies.
There were further chances at both ends for Bishop, Wells and Butterfield as the frenetic pace continued.
Huddersfield successfully took the sting out out the match in the closing stages by slowing the game down and holding the ball up in the corners.
It snuffed out any chance of a late Ipswich equaliser to leave the Tractor Boys outside the play-off places.