He also admitted to trying to kill Mr McGregor in the same incident.
At the High Court in Edinburgh the judge also disqualified Gavan from driving for 15 years.
Lady Scott told him: “You did not care who you struck when driving your car. Your actions were wicked and reckless.
“The children were thrown into the air like skittles. One of your victims was later found to have a broken neck. She has undergone painful surgeries and she has tackled her ordeal with dignity and courage.”
An earlier hearing was shown graphic CCTV footage of the children being hurled into the air as Gavan struck them.
One 14-year-old girl – who Gavan also reversed over – suffered a broken neck and required lengthy surgery.
Prosecutor Maryam Labaki said the background to this crime was a “family feud” which involved a fatality.
The court heard Gavan’s former co-accused Gary Owen – who had his not guilty pleas accepted – is a relative of a man who is wanted in connection with the play park shooting of Jamie Lee.
The hit and run happened after Billy McGregor – also known as William Dearie – had gone to a local shop at about 16:00.
As he crossed the road he spotted Gavan’s silver Vauxhall Astra heading towards him.
The court heard the car accelerated, mounted the pavement and then struck Mr McGregor.
It then carried on and ploughed into the children.
Distressed relatives of the young victims sobbed and one woman left the courtroom as CCTV of the incident was played to the court.
In the footage, a 14-year-old girl was seen being unable to get up. Gavan then reversed over her before driving off at speed.
The court was told he was unaware she was still on the ground.
The teenager was found to have a badly broken neck and needed an initial six-hour operation.
She later had a titanium plate attached to her spine to help her recovery and spent weeks in hospital.
The court heard her injury was “healing well” and that she will make a full recovery.
A 13-year-old boy was treated for a leg injury while a 14-year-old boy needed stitches for a knee wound.
A 13-year-old girl was badly bruised while a 12-year-old girl was treated at hospital for muscle injuries. Another 14-year-old girl required physiotherapy.
Mr McGregor had cuts to his arm and leg – as well as bruising – but “declined medical attention”.
The court heard Gavan’s guilty plea was accepted on basis he had “intended to cause physical injury” to Mr McGregor.
Gary Owen, 20, had also faced the attempted murder claims but his not guilty pleas were accepted.
Gavan and Owen, along with Ali Coats and Jay Gavan, 20, had further faced a charge of attempting to pervert the course of justice in connection with the crime.
Not guilty pleas were also accepted for that allegation.