Thirteen other people, ranging in age between 10 and 59, were injured in the attack in the Greektown district of Toronto, police chief Mark Saunders told reporters.
The suspect, 29, had an exchange of gunfire with police officers before being found dead nearby.
The motive for the shooting is unknown.
Police have not identified the suspect, who was from Toronto, and it is unclear if he was killed by police gunfire or took his own life.
The attack happened on Sunday evening. In a video clip shared by Canadian media, a white man wearing a dark cap and dark clothing and carrying a shoulder bag can be seen stopping on a pavement and pulling out a handgun before firing shots.
My thoughts are with everyone affected by the terrible tragedy on the Danforth last night in Toronto, and may the injured make a full recovery. The people of Toronto are strong, resilient and brave – and we’ll be there to support you through this difficult time.
— Justin Trudeau (@JustinTrudeau) July 23, 2018
Emergency services were called out just after 22:00 (02:00 GMT Monday). The site of the attack is a piazza with a fountain that is popular with local people and was busy at the time, the Toronto Globe and Mail writes.
A number of people were reportedly hurt in a cafe called the Demetres, while others were hit in the street.
Det Sgt Terry Browne, who is leading the investigation into the shootings, told reporters on Monday that “some individuals have what may be described as life-changing injuries” following the attack.
According to the Special Investigations Unit, which looks into incidents involving police which result in death, the gunman was tracked by officers to Bowden Street, a short distance from the cafe.
“An exchange of gunfire” then took place, before the man fled once more. He was found dead about 100m (328ft) away on Danforth Avenue.
Andrew Mantzios had been drinking coffee with friends by the fountain when he heard shots and turned around to see the gunman coming towards his group.
“He had this horrible expression on his face,” Mr Mantzios was quoted as saying by the Globe and Mail.
The gunman fired at a crowd of people waiting to cross the street, he said.
“And then a lady tried to run and she fell down. He turned around and shot her point blank, two or three times.”