Armed police surrounded the train after a 37-year-old man, who had earlier arrived on a ferry from Ireland, allegedly threatened two passengers and claimed he had a gun.
After more than an hour of negotiations a man gave himself up and was taken away by police for questioning.
The rest of the passengers were eventually allowed to continue their journey.
A man - who has not been named - is currently being held in custody at Caernarfon Police Station.
He is due to be questioned by officers from British Transport Police later on Friday.
The passengers had set out from Dublin at 2200 GMT on Thursday for the ferry crossing to Holyhead.
Negotiations
They boarded a train for Holyhead bound for Birmingham New Street just before 0200 GMT on Friday.
Their two-hour ordeal began as the train travelled across Anglesey to Bangor.
Eyewitnesses claimed that a man threatened two people on board the train, claiming he had a gun in a bag.
Armed police then surrounded the train as it pulled into Bangor station.
The passengers were initially told they would have to leave the train because it would have to be impounded by North Wales Police.
But a short while later they were able to continue their journey on the train to Birmingham.