The 227-page consent decree comes after the Justice Department monitored Baltimore's policing methods for more than a year after the 2015 death of Gray, who suffered a fatal injury while being transported in a police van.
"We now require cameras in those vans," Mayor Catherine Pugh said.
"We want to make sure that individuals are transported singularly and that they're strapped into those vans correctly and that people are not harmed in that process."
But the troubled police department's problems went beyond its transport of prisoners.
The decree also mandates community oversight; new recruitment policies; additional training on stops, searches and arrests; an emphasis on "de-escalation, using tactics that defuse incidents"; and sexual assault investigations that promote "victim-centered, trauma-informed approach and combat gender bias."
"Through this agreement, we are moving forward together to heal the tension in the relationship between (the police department) and the community it serves," Attorney General Loretta Lynch said at a news conference, flanked by the mayor and Police Commissioner Kevin Davis.
"We have no illusions that the change we seek will be easy," Lynch added. "It will require a great deal of work from the leadership and officers of the Baltimore Police Department. It will require persistent feedback and input from community members."
The decree was filed in federal court, and -- after the expected approval by a judge -- a period of community input will be followed by the selection of a monitor to oversee the police department.
"We have come a long, long way," said Principal Deputy Assistant Attorney General Vanita Gupta, head of the Justice Department's Civil Rights Division.
The announcement follows a scathing Justice Department report
in August that said the unconstitutional practices of some of the city's 2,600 officers led to disproportionate rates of stops, searches and arrests of black residents, and excessive use of force against juveniles and those with mental health disabilities.
The report, which covered data from 2010 to 2016, attributed the practices to "systemic deficiencies" in training, policies and accountability structures that "fail to equip officers with the tools they need to police effectively."
Gray's death touched off protests and riots in Baltimore and other cities and fueled a debate over racial bias in policing that drew federal scrutiny.
Attorney Billy Murphy, who represents Gray's family, called the agreement "a revolution in policing in Baltimore."
"They are gratified that if the police department is finally reformed in the right way, their son did not die completely in vain," he said of the family.
City officials in September 2015 approved a $6.4 million settlement
on all civil claims tied to Gray's death.
Gene Ryan, president of the Baltimore Fraternal Order of Police Lodge 3, declined comment on the consent decree, saying the police union was excluded from negotiations and had not seen the document.
"As we were not afforded an advance copy of the agreement, neither our rank and file members who will be most affected, nor our attorneys, have had a chance to read the final product and, as such, we will not have a comment now," he said in a statement.
Lynch on Thursday said the Baltimore agreement is binding.
"It will live on past this administration," she said.
The decree comes in the same week as confirmation hearings for Sen. Jeff Sessions, President-elect Donald Trump's nominee to head the Justice Department and days before Lynch steps down.
Sessions' record has raised eyebrows with rights organizations such as the American Civil Liberties Union, which considers the senator from Alabama "hostile to consent decrees."
The ACLU cites a forward that Sessions wrote for a 2008 report published by Alabama Policy Institute
in which he states: "One of the most dangerous, and rarely discussed, exercises of raw power is the issuance of expansive court decrees. Consent decrees have a profound effect on our legal system as they constitute an end run around the democratic process."
Session's skepticism on police reform is in sharp contrast to the Lynch's Justice Department under the Obama administration.
The department's Civil Rights Division has investigated 25 law enforcement agencies over civil rights abuses during the past seven years; 14 investigations have ended in consent decrees. The department is enforcing an additional 19 agreements with law enforcement agencies.
Sessions' testimony on police reform
During Sessions' confirmation hearing Tuesday, Sen. Mazie Hirono, D-Hawaii, asked the attorney general nominee whether he would commit to maintaining and enforcing consent decrees. He responded that a decree isn't "necessarily a bad thing" but said he remained wary of lawsuits against police departments.
"I think there is concern that good police officers and good departments can be sued by the Department of Justice when you just have individuals within a department that have done wrong," Sessions said.
"These lawsuits undermine the respect for police officers and create an impression that the entire department is not doing their work consistent with fidelity to law and fairness, and we need to be careful before we do that."
Sen. Thom Tillis, R-North Carolina, followed by asking Sessions whether the Justice Department would help if cities asked for assistance. The nominee said, if asked, it should help.
"I think it's a good thing that police departments might call on federal investigators," Sessions said.
Yet he cautioned against undermining police departments.
"It really is important that people trust police departments and the police departments have respect from their communities, and when you don't have that, people's safety is at risk." Sessions said.
Besides Baltimore, police departments in Ville Platte, Louisiana, and Chicago have also been under the Justice Department's radar.
The department soon is expected to release the results of an investigation into Chicago police.
Known as a "pattern and practice" inquiry, it's expected to focus on use of force, deadly force accountability and how the Chicago force "tracks and treats" those incidents, Lynch said when she announced the investigation in December 2015.
In an unrelated news conference Wednesday, the attorney general said she couldn't comment on when the Chicago report would be released but said Justice Department officials have been working "very diligently" with the city and police department.
"We do intend to push through and ... give the city of Chicago, both law enforcement and the communities, the help that they deserve so that they can in fact work on this issues," Lynch said.