Half-Life 2 is part of a greater mythology and is internally consistent with the bigger game story. Basically the short version is that at the end of Half-Life Gordon became the unwilling tool of the G-Man and the G-Man sees fit to place Gordon into the Half-Life 2 timeline knowing full well what he'll do (suggesting that by fighting the Combine you are fulfilling the G-Man's nefarious wishes.)
Swiped from wikipedia:
SPOILER WARNING
"The original Half-Life, released on November 19, 1998, largely took place at a remote civilian and military laboratory called the Black Mesa Research Facility. During an experiment, researchers at Black Mesa accidentally caused a "resonance cascade" which ripped open a portal to an alien world; Xen. Creatures from Xen flooded into Black Mesa via the portal and started to kill anyone in sight. The player took on the role of Gordon Freeman, one of the research scientists involved in the accident, guiding him in his attempt to escape the facility. At the end of the game, Gordon was extracted by a mysterious figure colloquially known as the G-Man who "offered" him employment. Freeman was subsequently put into stasis by the G-Man.
Half-Life canon dictates that Gordon Freeman either agreed or was not given a real option with respect to the G-Man's offer. Half-Life 2 picks up the story with the G-Man taking Freeman out of stasis and inserting him on a train en-route to City 17 an indeterminate number of years after the Black Mesa Incident. Official sources differ on the actual length of this intermission—a story fragment written by author Marc Laidlaw for the development team puts the intermission at 10 years, while Half-Life 2: Episode One's Web site puts this intermission as "nearly two decades" after the end of the events of Half-Life."
The Beginning of Half-Life 2:
"At the start of the game, the G-Man speaks to Gordon Freeman as part of a hallucination-like vision as he is pulled out of stasis. The world has been overtaken by the Combine forces. Gordon meets up with Barney Calhoun and sets out for Doctor Isaac Kleiner's lab while being chased by Civil Protection. Gordon eventually meets Alyx Vance and is taken to Doctor Kleiner's lab. At the lab, an attempt to teleport Alyx to Black Mesa East works, but the teleporter fails for Gordon due to interference by Kleiner's pet head crab Lamarr and alerts the Combine of Gordon's arrival in City 17 after being teleported to Dr. Breen's office twice. Barney instructs Gordon to take the city's canals to get to the lab of Alyx's father, Dr. Eli Vance."
The End of Half-Life 2
"Gordon and Alyx pursue him, and Gordon destroys the reactor, both to depower the Citadel and to prevent Breen's escape. This triggers a massive explosion in which Alyx and Gordon are imperiled.[28] However, at the moment the reactor explodes, time stops. The G-Man emerges, commenting on Gordon's successful endeavors, before placing Gordon back into stasis, and leaving through a door of pure light. The game ends exactly as it began, in darkness. The story continues from this point in Half-Life 2: Episode One."