The England international kept his nerve to land the decisive one-pointer at the end of a thrilling, see-saw encounter which, in truth, neither teams deserved to lose.
It was all-action from the start. Leeds scored two tries in the opening 15 minutes, but on both occasions dropped the ball directly from the restart and conceded immediately.
A well taken try by Brad Dwyer gave Rhinos a six-point lead at half-time and they were the better team over the opening 40 minutes, but both coaches will have had a similar message to their players during the break: “Cut out the errors and we’ll win this.”
A controversial try levelled the scores early in the second period and Warrington went ahead through a penalty soon afterwards, only for Leeds to equalise with 13 minutes left.
They went back in front moments later, the visitors won it with seven points in the final four minutes.
It was a cracking game, played in a noisy atmosphere and a credit to both teams, who were backing up on a short turnaround, Leeds three days and Warrington four.
With Callum McLelland unavailable due to concussion, Liam Sutcliffe returned from a similar layoff at stand-off and had a fine game for Leeds.
There were also strong contributions from the likes of two-try Harry Newman and forward James Donaldson, in a rare start, but it was hard to fault anyone on either side for the entertainment provided in such difficult circumstances.
If only rugby league had administrators of a similar calibre. It certainly deserved a bigger attendance than the 9,196 who turned up, Leeds’ lowest gate for a regular season fixture since 2003.
Rhinos made a high energy start and opened the scoring with an excellent try by Harry Newman after eight minutes of almost constant pressure.
It was fashioned by Richie Myler who drew two defenders before slipping out a pass which the centre finished in style.
Rhyse Martin’s touchline goal was icing on the cake, but Leeds’ lead lasted less than four minutes, after Zane Tetevano knocked on returning the restart.
Leeds-bound Blake Austin and Ben Currie were both repelled by some strong defence, but Mike Cooper went over from Daryl Clark’s pass on the last and Stefan Ratchford added the extras.
It is remarkable how often teams fail to complete the set after they have scored. It was Warrington’s turn when Austin couldn’t take Clark’s pass and again the error was punished.
Rhinos could have taken the two after Warrington were caught offside but opted to keep the pressure on and the gamble worked when Mikolaj Oledzki crashed over from Dwyer’s pass out of acting-half, Martin converting.
Dwyer started against his former club in place of Kruise Leeming, who was ruled out because of an ankle injury.
Yet again, the good work was undone immediately as Myler misjudged the restart and Tetevano knocked on to concede a drop out, from which Austin crossed off Cooper’s pass and Ratchford converted.
Warrington got over Leeds’ line a third time, after 25 minutes, following back-to-back penalties, but Myler and Donaldson did really well to prevent Josh Charnley getting the ball down.
Referee Chris Kendall indicated no try and video assistant Robert Hicks agreed and rather than being potentially six points behind, Rhinos were in front by a similar margin within moments.
They got a penalty for offside in the next set and on the last, Luke Gale stepped both ways before slipping out a low offload which Dwyer collected to go over for Leeds’ third converted try.
There was another escape for Rhinos when Clark lost the ball trying to go over from close-range after an error by Martin.
Warrington hit back 11 minutes into the second half with a dubious score awarded to Charnley.
He seemed to put the ball down on Dwyer’s chest or arm, the Leeds man came up with it, but Kendall indicated a try and Hicks agreed. That incident – as did one that cost Castleford Tigers dearly in the Challenge Cup final - highlighted the problem with the current system.
If a referee is sure, why hand the decision on? And if he isn’t, it makes no sense giving any weight to the original call.
Anyway Ratchford landed an outstanding goal to square the scores and then booted the visitors in front with a penalty, following a high tackle by Matt Prior on Chris Hill with 19 minutes left.
Moments earlier, Ash Handley had dashed clear to set up a chance, but Newman’s pass was spilled by Prior close to the line.
With 13 minutes remaining, Warrington forward Jack Hughes was sin-binned for a late challenge on Gale and Martin took the two.
A couple of minutes later, Newman proved what a class act he is with a sensational try, taking Gale’s pass, running across field and then slicing through the defence to make the conversion a formality.
It looked like that would win it, but in the 77th minute Danny Walker caught Rhinos napping with a brilliant run from acting-half and Ratchford’s goal made it 26-26. Dwyer failed with a drop goal attempt before Williams took his chance.
The penalties were shared six-each and both teams had two set restarts.