The unnamed girl was killed in a drive-by shooting next to a petrol station on Sunday, according to local media.
Police have launched an investigation but are yet to make any arrests.
Officials have vowed to further crack down on violent crime. Incidents involving gangs have risen in recent years.
Police were called to the scene of the shooting, south of Stockholm, in the early hours of Sunday morning.
Details of what happened have not been officially confirmed, but local media outlets reported that the gunmen had been aiming at two members of a criminal gang, and had not intended to shoot the child.
People placed flowers and candles at the scene on Monday, with some calling for tougher action on gang violence in the country.
“This can’t happen again. It’s a 12-year-old girl,” one woman told AFP news agency.
Justice Minister Morgan Johansson told local news agency TT he was dismayed and disgusted by the girl’s death, as he pledged “more police and harsher sentences”.
National police chief Anders Thornberg said authorities would “set things right when it comes to increasingly serious violence in society”, while opposition MP Johan Forssell said there needed to be a re-think “to make Sweden safer.”
Sweden announced last year that it had set up a special task force to combat gang violence in the country amid a rise in incidents.
Police have been given additional surveillance powers and sentences for drugs and weapons-related crimes have been increased in recent years.
Twenty people have been killed in 163 shootings in the first six months of 2020, according to police data. In 2019, 42 people were killed in 334 reported shootings.
Police say criminals involved in gun crime are often connected to the drugs trade.