Chris Chester’s side had only led 21-10 on the hour mark, embroiled in the sort of fraught, sketchy match that you would expect from two sides each struggling for form.
However, it was Wakefield who finally came good, gradually wearing their opponents down and finishing with a late flourish.
Captain Jacob Miller eased nerves when error-ridden Huddersfield - yet again - spilled coming out of their own half.
He raced 40m untouched to jubilantly dive over and, when the Giants' attempt at a short restart backfired, Australian hooker Randell did similar to complete his treble in the 72nd minute.
Approaching his 27th birthday, it was the first time the former Newcastle Knights star had ever crossed for three tries in his senior career.
It is the third time Wakefield have beaten their West Yorkshire rivals this term; on both previous occasions they have needed a drop goal to settle the tie but last night Miller’s late one-pointer simple rubbed the salt in.
For Huddersfield, this was a fourth straight defeat that leaves them just two points off bottom and they have still not won at Belle Vue since 2015.
They were kept pointless in the second half as Trinity's fine defence continually kept them out of range and the only real positive for them was the return of captain Leroy Cudjoe, the former England centre who played for the first time in 10 months.
He did well in defence, dragging Ryan Hampshire to the ground Gordan Tallis style at one point, but rarely had a chance to show his attacking quality.
It was Trinity, with Bill Tupou making his own welcome return from injury, who instead who scrapped, battled and fought their way home.
Granted, at times it was not pretty but it did not to be and all that matters for Chester’s side - wonderfully served by Randell, Pauli Pauli and Craig Kopczak up front - was that they arrested that slump.
They stay eighth but have moved four points clear of Giants in ninth.
Things did not go well for Simon Woolford’s team from the start when they sailed the kick-off dead.
That put them under immediate pressure but, in their defence, they countered to score the first try of the night in the ninth minute.
Centre Jordan Turner popped up in midfield around 20m from the Trinity line and dabbed agrubber through that caught everyone apart from Alex Mellor by surprise.
Lee Gaskell improved only to see Turner undo all his good work by spilling in the restart set on his own 20. It became a recurring theme for the visitors.
From there, Randell darted over for his first try, sniping through some alarmingly poor defence for Danny Brough to level.
Still, even Brough - normally so accurate with the boot - had issues, slicing a kick straight into touch as the scrappy contest continued to stutter along.
It was no surprise when he accepted a couple of penalties to keep the scoreboard ticking over but Huddersfield were then able to deliver some class to eliminate the four-point deficit.
David Fifita was high on Matt Frawley and from that gifted field position, Gaskell picked out a love;y floated pass that gave young winger Louis Senior just enough sight of the line to cross in the corner.
They should have built on that but when Aaron Murphy was needlessly sin-binned - preventing a quick 20m restart when a Giants kick rolled dead - it was the hosts who struck.
Initially, Trinity spurned one opportunity; Mason Caton-Brown hacked ahead when Gaskell’s pass went to ground and regathered 50m up the field but then spilled as Louis Senior got back to deny him.
Chester’s side pressed further and eventually provided with the last play of the half.
Mellor does not ordinarily kick and that was plain to see as the Giants back-row became the latest player to flight a ball straight out.
Miller could hardly contain his delight, almost laughing at the Leeds Rhinos-bound player and even, at one point, mock stroking his offending right leg.
Soon after, the hosts forced a drop-out and then struck as Hampshire kept the ball alive and Randell showed great acceleration to drive past Dale Ferguson from 20m out.
Borugh’s conversion saw Wakefield 16-10 ahead at the break and he soon tagged on a drop goal against his former club.
Ben Jones-Bishop then stole possession from Innes Senior before Brough’s lovely delayed pass saw Jordan Crowther splinter Giants too easily again for another try.
Remarkably, Brough hit a post with the simple conversion attempt, perhaps the first sign that all was not well with the veteran.He went off soon after so Hampshire added their next penalty in the 61st minute before the hosts eased home.
Wakefield Trinity: Hampshire; Jones-Bishop, Lyne, Tupou, Caton-Brown; Miller, Brough; England, Randell, Kopczak, Pauli, Tanginoa, Crowther. Substitutes: King, Wood, Fifita, Gwaze.
Huddersfield Giants: McIntosh; L Senior, Cudjoe, Turner, I Senior; Gaskell, Frawley; Clough, O’Brien, Ikahihifo, Murphy, Mellor, Lawrence. Substitutes: Leeming, Matagi, Ferguson, Ta’ai.
Referee: Greg Dolan (Leeds)