Here's why:
* Act 1, Scene 1: The play opens with Horatio and Marcellus (a soldier) discussing the recent appearance of the ghost. They tell Hamlet about it.
* Act 1, Scene 2: Hamlet, after hearing about the ghost from Horatio and Marcellus, expresses his desire to see it for himself.
* Act 1, Scene 4: The ghost appears to Hamlet and Horatio, with Marcellus present as well.
Therefore, Horatio, along with Marcellus, witnessed the ghost before Hamlet did.