State prosecutor Marilyn Mosby said the death of the 25-year-old black man was a homicide, and his arrest was illegal.
Protesters cheered as she announced charges ranging from second-degree murder to assault. But a lawyer for the officers says they "did nothing wrong".
Gray's death - from injuries in custody - sparked protests that turned violent.
"The findings of our comprehensive, thorough, and independent investigation coupled with the medical examiner's determination was a homicide... has led us to believe that we have probable cause to file criminal charges," Ms Mosby told a news conference.
Celebrations broke out across Baltimore after the announcement. Drivers honked their car horns as people took to the streets with fists raised in triumph.