The man also threw grenades into a crowded square from a rooftop before killing himself, reports say.
He was named as Nordine Amrani, aged 33. He was known to police for firearms offences. Officials said the attacker acted alone, ruling out terrorism.
His victims were two teenage boys aged 15 and 17, a man aged 20 and a 75-year-old woman. A 17-month-old girl later died of her wounds in hospital.
The city’s mayor said the teenagers were celebrating finishing their exams and were heading to the Christmas market when they were killed. Around 120 were injured.
In 2008 Amrani was sentenced to 58 months in prison for illegal possession of ten firearms, 9,500 ‘gun parts’ and 2,800 cannabis plants but was granted parole last year. He also had convictions for pimping and trafficking stolen goods.
Amrani was due to attend a police interview in the late morning but never showed up. Instead he left his apartment armed with a Belgian-made FAL automatic rifle, a handgun and up to a dozen grenades carried in a backpack.
He walked onto the bakery’s flat roof and from his 15ft high vantage point lobbed three hand grenades towards a busy bus shelter before opening fire on the crowd. He was never linked to any terrorist act or network.
“It was a lone gunman,” said Benoit Ramacker, centre for the Federal Crisis Centre, referring to reports in the initial confusion that there had been three or four assailants.
Later Belgian police discovered a woman’s body in a shed belonging to a gunman. The body was found with a bullet wound to the head, say Belgian justice officials.
The body found at the killer’s property was that of a cleaner, reported to be 45 years old, who worked for one of Amrani’s neighbours.
Also found in the shed were two weapons and a stockpile of ammunition, the public prosecutor, Daniele Reynders, told a news conference.
“It’s very difficult to determine the reasons for the attack, but we’re investigating all avenues.” Official sources said police had recently raided Amrani’s home in Liege seeking cannabis plants but had found firearms instead.
Witnesses said Amrani shot himself in the head with a handgun, but Danielle Reynders, public prosecutor in the city of 196,000, said it was not clear if he had killed himself or died from shrapnel wounds caused by one his grenades.
She said he still had a number of grenades in his backpack when he died.
“He wanted to hurt as many people as possible,” journalist Nicolas Gilenne told AFP. “I heard four explosions and shots during about 10 seconds.”
One official told AFP that a Christmas market was meant to be taking place in the square that day but its opening had been postponed because of bad weather. “Otherwise many more would have died,” said the official.
Place Saint-Lambert is a busy intersection, served by hundreds of buses daily. It hosts an annual Christmas market which attracts some 1.5 million visitors a year.
Speaking from her apartment door, Madame Luyx an elderly neighbour, who lived opposite gunman’s apartment, said: “We knew he had been to prison. I was worried so I always kept my door locked.”
Belgian Prime Minister Elio di Rupo, visiting the scene, described the attack as “horrible”. “There are no words to describe this tragedy,” he said.
“We think first and foremost of the innocent victims, their family and friends. We also think of all the people working at the scene and more generally of the people of Liege.
“The whole country shares the pain of the families affected. We share the shock of the population.”