Rose Williams said she and others were subjected to a stream of abuse after a group got on the Aberystwyth-bound train at Borth, Ceredigion, on Sunday.
The microbiology student said the "heinous attack" came out of nowhere.
British Transport Police (BTP) said it was treating it as a racist incident and transport bosses say they "utterly condemn this abhorrent behaviour".
In a post widely shared on social media, Ms Williams shared video footage of a man pointing and laughing at her while shouting racist slurs in the carriage.
Speaking to BBC Wales, she described in detail the language and abuse she had been subjected to.
The student, who has lived in Aberystwyth for six years, said she was travelling back from a weekend away in Manchester with friends when the incident happened.
She explained her friends had just got off, when a group of men and women came into the carriage at Borth and one of the men started pointing at her, calling her a "big black dog".
"It shocked me, it took me by surprise," she said.
"His friends joined in and they were all chanting, 'There's a dog on the train', raising their hands in the air like, jumping off their seats and laughing about it."
Ms Williams said she tried to remain calm as she was on her own, as the man started to change his chants, directing them towards other people of colour on the train.
She said the abuse was continuous and lasted for about 20 minutes, adding she managed to film them before the train pulled into the station at Aberystwyth.
Ms Williams said she felt so angry she could cry, but said she did not want to give the group the satisfaction of seeing her react, or "let them win".
"I was frozen in the seat, I was sat there shaking because I was angry and I was trying to not react and provoke or escalate the situation where it possibly become physical," she said.
"They were obviously looking for a reaction, that's why they continuously did it and did it, and I didn't give them that satisfaction.
"I was on my own on the train, I thought the best thing to do was to sit in silence and wait."
Ms Williams said she texted her friends who met her at the station, and once out of sight of the group she broke down, before her friends helped her to report the incident to police.
"I've sat and gone through the situation in my head. I didn't say anything to these people, there was nothing that happened that provoked such a heinous attack on me, and the other people... it just came out of nowhere, he got on the train and started racially abusing us," she said.
Ms Williams who described the university town as her second home said she had been subjected to racist abuse in the past but never to an extent where they "verbalise the hate towards me for such a long period of time".
"You see video footage of stuff like this happening to other people, I never thought it'd happen to me, although it was naive of me to think that, because I am a black woman," she added.
Ms Williams said it was important people reported hate crime to the police, and she hoped they would not just get a slap on the wrist.
A spokesperson for Transport for Wales, who run the service, said it was working closely with police with their investigations and urged anyone on the train to contact officers.
"We utterly condemn this abhorrent behaviour and are treating this report very seriously," they said. "We encourage victims and those who witness such crimes to report it immediately - we will do all we can to help.
"We are proud of the diversity within Transport for Wales and the diversity of the customers we serve, and we stand together alongside our industry partners to say loud and clear that any form of hate crime will not be tolerated on our services."
A BTP spokesperson said they were investigating a report of a racist incident on board a train between Machynlleth and Aberystwyth.
They urged anyone who had witnessed the incident to contact them.