Also, on the G-man. There is no evidence what so ever that he is working for anyone else. Merely what he says, which is not to ever be trusted. His greatest asset is his mystery, a masquerade he creates around himself.
G-man is the controlling super being of Xen. An almost God like entity in control of Xen and thus interdimensional travel.
The combine, able to travel between dimensions regardless still need to be able to travel within dimensions effectively, something for which Xen is required.
They seem to be in luck when they find the Vortigaunts, a race intended for conquer and assimilation. The Vorts ability to manipulate the border world to teleport within their own dimension ( saving Alyx and Gordon HL:Ep1 ) seems to be the answer to their prayers. Using their own abilities with biological tampering/improvement they create a creature that will let them travel freely anywhere, both within and inbetween dimensions. This creature will also control the unruly and dangerous vorts through a Vortessence mind control.
The combine however drastically understimated their new creature, the Nihilanth, due mostly to their ignorance of the Vortessences true power. The creature rebels against the Combine, taking control of the Vorts for itself and waging war against it’s old masters. A war it cannot win as it simply does not have the numbers.
It uses it’s combine infused abilities to take it’s slave army into hiding, to the only place the Combine could not get, Xen. Bringing with it some of the wildlife of the Vort homeworld.
In doing so it comes into direct confrontation with the G-Man, and even manages to take control of at least part if not all of Xen from ‘him’, blocking his power over the borderworld and thus those who use it either directly or indirectly.
Thus the G-Man makes a deal in order to take back control of Xen with the Combine. He will lure the Nihilanth out of Xen, letting the Combine destroy their rogue creation whilst also giving them a new planet to conquer, Earth.
This however doesn’t go as planned thanks to one man, Gordon Freeman. In destroying the Nihilanth himself Freeman inadvertantly gives the Combine what they wanted in the first place, a direct link to Xen and perhaps the ability to control it. This due to the technology still being on Earth in Black Mesa, which would of surely been destroyed had the Nihilanth and his full armies come to Earth through portals, most secure at the dimensional rift at Black Mesa.
The combine now have what they want, the Nihilanth destroyed and the technology for teleportation through capturing the human resistance. (HL:2)
The G-man now has an even bigger problem, the ever looming threat of a Combine take over of Xen and thus an enemy able to travel anywhere any time throughout any dimension, a near unstoppable force, destined to destroy/assimilate all life.
Now he must use Freeman and his own almost god like abilities to see he is always at the ‘wrong’ place at the right time in order cripple the Combine threat and then wipe them out for good.