Rhinos went ahead early on through a Kallum Watkins try and the first of his four goals, but tries by Jacob Miller and Kyle Wood and two Ryan Hampshire conversions sent Trinity in 12-6 ahead at the break.
Leeds levelled through Ash Handley’s converted try, but Hampshire kicked a penalty and then converted Matty Ashurst’s try to make it 20-12 with 25 minutes left.
Watkins’ second try got Leeds back in it and then Brad Singleton crossed from Richie Myler’s kick and the conversion edged Rhinos in front.
When Josh Walters scored a converted try with three minutes left that seemed to be it, but Trinity staged a grandstand finish as Max Jowitt crossed and Hampshire converted.
Reece Lyne made a strong run in the final seconds, but Leeds’ defence held on to condemn Wakefield to a fifth straight defeat.
Check back later for a full report and reaction.