The youngster had to undergo surgery after being mauled by the bull terrier which belonged to former West Yorkshire Police officer Gillian Crann.
A court heard how the boy’s mother feared he was going to be killed.
The animal then turned on the mother as she tried to protect her son.
Crann was three-and-a-half times the drink drive limit at the time of the incident and did nothing as the dog, called Gladys, bit the boy’s face and body.
The attack only ended thanks to the bravery of a neighbour who dragged Gladys away to allow the mum and son to escape.
Crann was given a suspended prison sentence and ordered to pay compensation over the incident in Horsforth, Leeds, on September 16 last year.
Leeds Crown Court heard Crann appeared before magistrates ten years ago - while she was still a serving police officer - after her Japanese akita dog mauled another dog to death in a park.
Crann, now retired from the police after 23 years service, was “clearly intoxicated” at the time of last year’s incident.
The attack happened when the mum and son walked past the garden of Crann’s home.
Martin Robertshaw, prosecuting, said Gladys was in the enclosed garden which was surrounded by an eight-foot fence.
Mr Robertshaw said the boy asked if he could see the dog and Crann said she would go to fetch a lead.
The prosecutor said: “Unfortunately she did not put it on a lead and opened the gate.
“The dog rushed out and proceeded to attack the young boy quite viciously.”
The prosecutor said the mother tried to protect her son but it then began to attack her.
Crann appeared to be “mumbling” as the attack took place.
Gladys attacked the boy again as he screamed for help.
Mr Robertshaw added: “His mother feared at the time that the dog would in fact kill her son because she was so concerned about the brutality of the attack.
“It is the prosecution’s case that it may well be because of alcohol that this defendant did not at any stage try to intervene to bring this incident to an end.”
The attack ended after a neighbour heard the boy’s screams and managed to drag the dog away.
The boy and his mother were taken to hospital by ambulance.
He suffered bite wounds to his head, ear and body.
The youngster had to have an operation to have 20 stitches to wounds to his body.
His mother suffered bites and bruising to her thigh.
Police went to Crann’s home and found the dog still running loose.
Mr Robertshaw said: “The defendant appeared to be claiming that it was an accident and the dog had simply run out and knocked the boy over.”
He added: “She appeared to be more concerned about getting the dog back than what happened to the young boy.”
Crann pleaded guilty to being in charge of a dog that was dangerously out of control.
Mark Brookes, prosecuting, said Crann was a widow, had health problems and was sorry for what had happened.
Mr Brookes said he could not object to an order banning her from keeping a dog because of the amount of alcohol in her system at the time of the incident.
He said: “I am in some difficulty in arguing that she was a fit and proper person to prevent the disqualification.”
“This is someone who clearly has a deep love in relation to the keeping of dogs.
“There must come a time when she needs to prove that she is a fit and proper person.”
Crann was given a 12-month prison sentence, suspended for 18 months.
She was also banned from keeping a dog for ten years.
Judge Mushtaq Khokhar also ordered Crann to pay £1,000 compensation to the boy and £500 to his mother.
She was also ordered to pay the £2,000 cost of keeping Gladys in kennels since the attack.
The judge awarded Crann’s neighbour £200 from public funds for his bravery.
The judge did not make a destruction order against the dog after hearing the animal will go to a different owner and will have to be muzzled in public.
Crann appeared before a court a decade ago while still serving as a police officer after her powerful dog savaged a student’s pet.
She failed to keep proper control of her Japanese akita dog – a powerful animal bred from hunting and fighting dogs – when talking it for a walk in her local park.
It attacked a smaller dog which later had to be put down.
Crann was charged with disorderly conduct over the incident and also faced a complaint of failing to keep a dog under proper control.
However, the public order offence was withdrawn when she agreed to be bound over for a year in the sum of £200.
It meant Crann escaped a criminal record but had to accept her behaviour was “below a reasonable level”.