Needham took an early lead and ultimately scored the only goal of the first half through Dan Morphew.
James Spruce then fought back in the second half to grab an equaliser for the Blues, before Jamie McGrath netted the winner late on to secure all three points for the Marketmen.
Brad Munn opted to make three changes to the side that fell to defeat to Alvechurch last weekend – Callum Cocks, Spruce and Andy Kanga all started, over Owen Betts, Cieron Keane, and Aaron Cole.
However, it was a start that did not go to plan for the Blues, as after less than a minute played, Needham took the lead. Morphew reacted quickest from a Nico Valentine corner to volley the Marketmen in front from 10 yards out.
Tevan Allen had an opportunity on goal ten minutes later, but Ross Durrant was equal to the forwards’ low-driven shot from the edge of the Blues’ box.
Then, in the 15th minute, Seth Chambers thought he had doubled Needham’s lead with a rebound strike that found the back of the net, however, the linesman pulled the play back for an offside decision.
A neat one-two between Kanga and George Atwal almost ended with the United striker finding the top left corner with a curled effort on goal, although the strike did not quite hit the target.
Kyle Hammond later had a chance on goal, as he latched onto a cleared corner with a venomous half-volley that forced Durrant into another exceptional reaction stop.
The first half ended somewhat abruptly, but the second half began with the Blues on the front foot – and that was evident in the 67th minute.
Spruce nicked the ball off the feet of the defender with a high press and finished off the attack with a low-drilled finish into the bottom right corner.
Valentine almost turned goal scorer with ten minutes left to play, as the winger let fire from 20 yards out, but it was another comfortable stop for Durrant.
Atwal then had a chance of his own late on – the midfielder carried the ball forward and saw his name in the spotlight as he struck an effort from 30 yards out – but unfortunately, the ball flew way wide of the target.
With two minutes left to play, McGrath broke the Blues’ hearts when he struck a rebound effort, after Luke Ingram hit the post, straight past Durrant despite United’s best efforts to keep the ball out.
That goal subsequently turned out to be the winner, as the game came to its conclusion and the Marketman had secured a last-gasp victory in Needham Market.