Charlie Hughes went from having up to 120 seizures a day to fewer than 20, after receiving cannabis oil privately.
Although medical cannabis was legalised in November 2018, almost no NHS prescriptions have been handed out.
A victory for the family could make the current guidance unlawful.
When the National Institute for Health and Care Excellence (NICE) produced guidance for the NHS, it said there was not enough evidence to recommend cannabis-based medicines for severe, treatment-resistant epilepsy.
Nusrat Zar, a lawyer working with the Hughes family to campaign for policy change, says although the guidelines did not recommend against prescribing the drug, the lack of a "positive" recommendation meant NHS doctors did not feel confident to do so.
NICE said it would not comment on an "ongoing legal matter".
Charlie has a rare form of treatment-resistant epilepsy called West syndrome which has left him with developmental delay.
He was given six different anti-epileptic drugs but the family, who are from Norwich, saw no improvement in his condition.
His father, Matt Hughes, said he felt they were "all out of options" after trying all the usual medication, and even exploring brain surgery for which they were told Charlie was not a candidate.
After obtaining a private prescription for cannabis oil, the family said Charlie's seizures reduced and his development started to speed up.
He became more vocal, took an interest in his toys and began to feed himself, they explained.
Brain scans also showed a significant reduction in "chaotic brain activity" associated with seizures, Mr Hughes said.
Charlie's parents say they will only be able to afford another six months of the medication without an NHS prescription.
They have been paying between £1,000 and £3,000 a month for oil made from the whole cannabis plant.
A High Court judge has accepted the family's application for a judicial review of the NICE guidance on two grounds.
The family's legal team argue that NICE did not have an adequate consultation when producing the guidelines, and that it failed to take into account relevant evidence, including that compiled when medical cannabis was legalised.
Cannabis-based medicines were made legal at the end of 2018, to be prescribed by specialists for patients who cannot be helped by other available drugs.
Changing the law involved the government recognising that cannabis had some medicinal benefit.
The chief medical officer for England at the time, Dame Sally Davies, said there was "conclusive evidence of therapeutic benefit for certain medical conditions, and reasonable evidence in several other medical conditions".
Epilepsy was on the list of conditions for which there was stronger evidence.
NICE contends that evidence for the effectiveness of cannabis-based medicines is so far relatively weak and evidence for its safety is limited.
There have been few large-scale trials.
When the Advisory Council on the Misuse of Drugs carried out a review ahead of the law being changed, while it agreed there was some evidence for its benefits, it pointed out that more research needed to be done.
But Caroline Barrett, the lawyer acting for the family in the judicial review, said although NICE left the option open to clinicians, its guidance was "so cautious that the effect is children aren't getting medical cannabis".
Mr Hughes said: "This is an important step in our ongoing fight for our son Charlie to receive the medicine he needs on the NHS.
"NICE will now have to explain and justify in the High Court the guideline which prevents Charlie, and others like him, from being prescribed cannabis-based medicinal products which help to control his rare form of epilepsy."
Schraer, Rachel. “NHS Cannabis Guidelines Challenged in Court.” BBC News, BBC, 18 Aug. 2020, www.bbc.com/news/health-53804780.
Can’t keep up with the crazy world of cannabis news? Get the best of The Blacklist Delivered weekly to inbox.