The club will then review the management situation at the end of the season.
Williams has been in caretaker charge since the resignation of Martin Ling in December. During his brief spell at the helm so far, the former Brighton & Hove Albion reserves and Under-21 coach has overseen victories against Southend United and Crewe Alexandra.
Chairman, Lee Power said: "After long conversations with Luke, I’m delighted to say that he has agreed to take the job until the end of the season. We will then sit down and discuss the possibility of him taking the job on a longer-term basis.”