Miller’s one-pointer, from half-way with just three minutes to go , secured a 25-24 win over high-flying Catalans Dragons and nudged Trinity closer to a place in the Super-8s.
It was Trinity’s ninth win from 10 games since Chris Chester took over as coach before Easter and came after they had trailed 14-0 to tries by Justin Horo, Jodie Broughton and Tony Gigot.
Wildcats hit back with tries either side of half-time by Ben Jones-Bishop, followed by a Mikey Sio touchdown.
Vincent Duport and Broughton crossed to make it 24-18, but Mickael Simon barged over between the posts and Liam Finn’s fourth conversion levelled the scores with nine minutes remaining.
Crucially, Pat Richards managed to convert only two of Catalans’ five tries and he hit a post with a penalty attempt from in front of the post, 40 metres out, with four minutes left.
Trinity took advantage of their let-off as Miller fired over his winning one-pointer in the most thrilling game of the Magic Weekend at Newcastle’s St James’ Park.
Wakefield played as Trinity, dropping Wildcats from their name for this game only. They will revert to Wakefield Trinity permanently from next year.