The charter bus from Austin, Texas, carrying 50 to 60 people, was heading north on Main Street when it got stuck as it tried to cross the train tracks, according to Cecilia Dobbs Walton, a city spokeswoman.
The eastbound CSX train struck the bus around 2:13 p.m., according to Vincent Creel, also a city spokesman.
Creel said three people were dead on arrival. The fourth victim died at the scene.
Several people were injured, including some seriously, officials said. The train crew was not injured, said CSX spokesman Gary Sease.
Sease said the eastbound mixed-freight train, heading from New Orleans to Mobile, Alabama, had three locomotives and 52 cars, 27 loaded cars and 25 empty cars.
The crossing has flashing lights and crossing gates, according to Sease.
“This is a tragic event for our city,” Biloxi Mayor Andrew Gilich said.
Police are talking to the bus driver and the train operator.
Sease said CSX personnel are working with first responders at the scene.
Mississippi Gov. Phil Bryant tweeted: “Please pray for the injured and the families of the lost.”
The National Transportation and Safety Board said the agency is gathering information on the crash.