Some of the hundreds who confronted lines of police officers got into shoving matches with helmeted cops while other demonstrators threw objects. At least five police cars were damaged by people who smashed windows and jumped on them.
Mayor Stephanie Rawlings-Blake said she was profoundly disappointed by the violence, adding that 95% of the protesters were respectful but a "small group of agitators intervened."
Twelve people were arrested, Police Commissioner Anthony Batts said.
"We continue to have a few isolated pockets of individuals causing disturbances. We are deploying resources to keep everyone safe," the Baltimore Police Department tweeted.
Fredericka Gray, the twin sister of Freddie Gray, made a statement: "My family wants to say, 'Can y'all please, please stop the violence? Freddie Gray would not want this.' Freddie's father and mother do not want any violence. Violence does not get justice."
Vandals broke and damaged storefront windows and trashed one 7-Eleven, police said. CNN crews observed a window damaged at a Michael Kors store and holes in one at a Subway restaurant.
The skirmishes followed a planned demonstration over how police handled the arrest of Gray, a 25-year-old Baltimore man who suffered a spinal injury at some point after he was detained by police on April 12. He died a week later.
The numbers of protesters dissipated substantially just before sunset, though some people were still walking in the streets near Oriole Park at Camden Yards, causing some traffic problems.
Earlier, demonstrators had marched through the streets until they arrived at City Hall. Along the way, whenever it appeared the protest might get out of control, organizers reined the marchers back in.
The event ended after speeches at Baltimore City Hall on Saturday evening, but many protesters continued to vent their anger by marching down to Inner Harbor.
When demonstrators got to the stadium, tensions escalated and some people threw what appeared to be water bottles and other objects at the cops, who wore helmets and stood behind metal barricades.
Fans who were arriving to watch the hometown Orioles play the Boston Red Sox were having trouble finding ways to the entrance gates. The Orioles won the game 5-4 in extra innings. For a time it appeared that fans would be held inside the ballpark until the demonstration quieted, but the gates were opened before the contest was over.
Throughout the day, protesters yelled, "No justice, no peace" and "All night, all day; we're gonna fight for Freddie Gray."
The police department used Twitter to update the public on the progress of the march. At City Hall, speakers demanded justice for the Gray family and an end to what they called police brutality against black suspects.
At least one protest organizer had promised in advance that the event would be big enough to shut down the city, but while many people turned out and walked, the major disruption was only to traffic on a few streets.
Gray died last Sunday. Protesters have marched since, outraged by the arrest, which was recorded on a bystander's cell phone and the nature of Gray's death. The witness said Gray was yelling and indicated he was having difficulty breathing.
At some point after he was detained, he suffered a severe spinal cord injury. His family said his voice box was crushed and his neck snapped before he slipped into a coma and died.
On Friday, police officials said that Gray should have received medical care at the site of his arrest and at other times as he was transported to a police station. The van carrying him stopped three times on its way to the station where he was to be booked, but when it arrived at the Western District officers called for an ambulance, which took him to a hospital.
The questions investigators are looking into are: How and where did Gray suffer a severe spinal injury? And are police liable for his death?
The preliminary work on his autopsy has been done, but the medical examiner's office is waiting on toxicology results and may invite spinal experts to look at the case, authorities said. A full report may take 30 to 45 days.
Batts told reporters on Friday there are no excuses for the fact that Gray was not buckled in as he was transported to a police station.
He also said officers should have given Gray timely medical care "multiple times."
Those comments upset members of the Baltimore Fraternal Order of Police.
"We are disappointed in the comments made yesterday by Commissioner Anthony Batts, and various members of his command staff, relative to the actions of the officers directly involved in the Gray investigation," Gene Ryan, president of the organization said in a written statement. "These comments appear to be politically driven and in direct contrast to the commissioner's own request not to jump to any conclusions until the entire investigation is complete."
Police say five of the six officers involved in the arrest have provided statements to investigators. The sixth officer has invoked his right to refuse to answer questions, Batts said.
A wake for Gray will be held Sunday, with a memorial service and funeral following on Monday.