Gordon Freeman is not a scientist, but rather a US Government black ops clone. He’s a genetically engineered super soldier who has mimetic imprints for memories that give him an almost unnatural skill for violence and mayhem in a carefully controlled package.
He appears on the Black Mesa train, as if out of nowhere. (Because he was inserted out of nowhere.) He arrives at Black Mesa, and everyone recognizes him–either they were briefed that he would be coming through and they should pretend to know him, or other “versions” of Gordon have been a fixture at this site before. Either way, the player’s initial unfamiliarity with the opening level might be a subtle hint that Gordon, despite allegedly being an employee, doesn’t actually know his way around. He even has to be reminded to put on his hazard suit before entering the test chamber. This is not the behavior of someone who regularly works in that facility.
And what’s he actually doing in Black Mesa on that fateful day? His part in the experiment turns out to be a very dangerous but not very complicated job, exactly the sort of thing you wouldn’t want to risk someone who had an MIT degree on. Now as it happens, it turns out that this particular sample was too pure, the resonance cascade hit, and now Gordon–who is essentially a living flight data recorder–is stranded down in the bowls of the facility. Good thing he’s got all that subconscious combat training to help him escape and make his report! Why would you need an autonomous data recorder that can defend itself? Well, because they expected that if anything went wrong, there would be hostile aliens to contend with, of course!
But there’s a glitch in the plan. Upon seeing the Marines, his programming to approach them and announce who he is so he can be taken safely into custody fails. He begins fighting them instead. The Marines, who had been briefed on who he was, what he looked like, and to expect him to peacefully surrender, are shocked and horrified to find themselves up against a super soldier. This is why the player sees graffiti on the walls like TRAITORS DIE! How could Gordon be a traitor against them if they didn’t expect him to be on their side? How would the Marines even know his name, as opposed to the hundreds, or even thousands of other anonymous civilians in the combat area? Marine chatter, radio traffic, and other bits of graffiti all clearly indicate the Marines know exactly who they are dealing with, and are infuriated that he has chosen to fight them rather than follow his “orders” and surrender.
The G-Man, who has an unusual and unnatural interest in Gordon from the very first moments of the game, shadows Gordon as he fights his way through the facility. Was he the one who flipped Gordon’s programming? Or is he only trying to make the best of a bad situation? Either way, at the end of the game he comes in to swoop Gordon up and place him in stasis until his hour comes again.