A television broadcast showed a fight breaking out in a small crowd of demonstrators less than half an hour before the curfew was to go into effect, but police in riot gear massed to control the protests stood by as community members calmed the crowd.
By 10 p.m., when helicopters flew over announcing the curfew, most of the demonstrators appeared to be leaving the streets.
Baltimore police said 18 people were arrested in protests today, and more than 250 people have been arrested in the city since Monday, when riots broke out after the Gray's funeral.
In response to the violence Monday night, city officials ordered a 10 p.m.-to-5 a.m. curfew, to extend through the rest of the week. Police said certain exceptions would be allowed, including for going to and from work and medical emergencies.
There were more demonstrations across the city throughout the day Wednesday, and though police said they were mostly peaceful, 16 adults and two juveniles were arrested, police said.
Dozens of people marched, many wearing black T-shirts that said: "Black Lives Matter" -- which has become the slogan of a nationwide movement against overaggressive policing.
In New York City, a crowd of about 1,000 people left Union Square at 7:20 p.m. and started to march west towards 5th Avenue, but they only made it about half a block before police took a stand and ordered them to get on the sidewalk. Those who refused started pushing and shoving with police officers.
Police said one precinct captain sustained a minor injury when he was struck in the head with a stick early on in Union Square, but there were no other serious injuries.
Later, the Holland Tunnel was briefly shut down outbound as dozens of protesters converged at the entrance, which police blocked off.
In all, police made had more than than 100 arrests at protests in New York City by 11 p.m. Most of the arrests were for walking in the street, which police said the demonstrators were warned not to do.
Before the march, while the group was in Union Square, police handed out flyers and used loudspeakers to warn protesters that they would be arrested if they didn't stay on the sidewalk.
In Baltimore, there were brief disturbances and objects thrown at police Tuesday night as the curfew went into effect, but police officials said earlier today they felt the curfew had been effective.
Some 2,000 National Guardsmen were deployed to the city after Maryland Gov. Larry Hogan declared a state of emergency.
The riots began Monday afternoon shortly after the funeral of Gray, and resulted in more than 250 arrests and injuries to at least 20 police officers Monday night into Tuesday. They began after a week of peaceful protests.
ABC News' Aaron Katersky contributed to this report.