Police shot and wounded the attacker and confirmed he had died in hospital on Monday morning.
The gunman had attacked from a moving car in the busy market square and fired indiscriminately at passers-by in Poland's second-biggest city.
The attack, which Poland's defence minister described as an "act of terror," happened on Saturday in Main Square, in the heart of Krakow's Old Town, a major tourist hub.
By Saturday evening, mourners had left candles in memory of the victims. The square remained partially closed on Sunday morning as authorities continued their investigation.
Authorities also found the bodies of the assailant's sister, mother and father at the man's family home in Ostrowiec Świętokrzyski, a city about 150km northeast of Krakow. They likely died from gunshot wounds.
Marie-Ange Collaer wrote on Facebook that she and her family survived the shooting during a trip to Krakow from Brussels.
"We literally ran for our lives and managed to hide from the bullets flying around," she wrote.
"Lying on the floor in a shop like in a bad police movie whilst you hear bullets everywhere."
Four women and two men were killed in the Main Square shooting. Three of the women and one of the men were Polish, Krzysztof Jan Klęczar, the Malopolska regional governor, said on Sunday. A man from the UK and a woman from an unidentified foreign country were also among the dead.
A video posted on social media showed a police officer repeatedly shooting the attacker, who was lying on the street. The officer later slowly collapsed to the ground.
The two police officers who stopped the gunman, in actions authorities hailed as heroic, remain in the hospital. They were both conscious by Sunday afternoon.
"If it weren't for the efficient and selfless intervention of these two young men, the number of victims could have been significantly higher," Klęczar said.
Michał Pędziwiatr and Mateusz Wierdak, two local surgeons who were having a bite to eat nearby, also stepped in.
Wierdak "took care of the officer who subdued the attacker because he truly needed urgent help," Pędziwiatr told Polish news website onet.
Five foreigners are among the wounded. They come from the UK, Portugal, Russia, Germany and Austria.
Interior Minister Marcin Kierwiński said the suspect held "very radical" and "ultranationalistic" views.
"Everything indicates that he was fascinated by far-right ideologies," Kierwiński said at a news conference.
Local officials in Ostrowiec Świętokrzyski said they seized seven weapons from the family home, bringing the total number recovered to 11, including four found on the suspect or in his car in Krakow. Both father and son had gun permits, they said.
Mass shootings are uncommon in Poland. However, in mid-October three attacks at schools in the central province of Mazovia took place within four days, leaving one person dead and many wounded.