London North Eastern Railway has apologised to customers left stuck in on a London-bound train for hours.