Wrexham 1 Lincoln City 0
In the 51st minute he brought down a cross from Richard Hope and from 20 yards gave keeper Alan Marriott no chance with his first-time drive.
It ended Wrexham's run of four league defeats on the bounce and saw the Imps go six matches pointless.
The game had plenty of drama and the Imps almost grabbed something in injury time, but Paul Green's shot hit Mike Carvill on the home goal-line and any chances of the visitors taking the precious point back home was lost.
In the 18th minute Wrexham's Neil Roberts held his head after his spot-kick was brilliantly saved by Marriott.
In the second half two rash tackles by Gary Croft in the space of three minutes on Carvill saw the Imps defender getting his marching orders.
There was little luck going for the Imps and four minutes before Williams' crucial goal, the battling Mark Stallard ended his breakaway move with a shot which went past keeper Anthony Williams, but Mark Jones stopped the ball on the goal-line and cleared.
During Wrexham's nervous ending Marc Williams could have eased the tension for the Dragons, but he missed two chances in front of goal in the 72nd and 75th minutes which led to the home side having to endure a desperate last ditch stand.
During the first half, apart from the drama of the 18th minute spot-kick, both sides were desperate for points and showed their nerves.
First Mark Jones' free-kick saw Marc Williams head at the keeper and then a free-kick from Matt Crowell got back the near post to the same player, but he lashed it wide.