My answer will focus on 4e, since it's the current edition, and since it has a higher support in terms of FAQs and general clarifications, because it's somewhat more streamlined/cleaned up, and finally because I stopped engaging with over a decade ago.
If the Halberdier is in Close Combat (i.e. same hex with the enemy), he needs to step back before attacking. All characters normally are allowed to take a one-hex step before making an Attack and other minimal-mobility combat manoeuvres. He can also use Retreats to get a semi-free step as part of a defence roll (after taking Manoeuvres that don't prohibit Retreats). Finally, as a last resort and a rather advanced-rules option, he can opt to attack at a penalty (see Martial Arts page 69 for this Technique).
If he's attacked while already in Close Combat, then his options involve Dodging, or Retreating with a Parry (or, if he has the traits required to wield a Halberd and a Shield/Buckler/Cloak at the same time, with a Block). There is a certain peculiarity of the order of operations in GURPS, especially as clarified by Martial Arts and Kromm's statements for the FAQ, that mean that a defender is treated as outside Close Combat if he took a Retreat (note: I can't guarantee this worked the same in 3e).
Now, a warrior with a short weapon deals with a somewhat different situation. If the Halberdier is not taking a Wait, she can just run up to him past his Reach and attack on her own turn - either by using Move and Attack, or All-Out Attack combat manoeuvres. A third option is All-Out Defence (Dodge), which also allows a half-maximum move, forces you to forego your attack until your next manoeuvre, and provides a defence bonus. All three have drawbacks, but typically allow crossing 3-5 hexes for a typical character, which should be enough to go from 'beyond even his range' to 'within even her range' (I'm assuming Reaches of 3 and 1 respectively here).
If he is taking a Wait, then he has the advantage of getting a chance to attack her first before she comes within her sword's Reach. This is the benefit long weapons offer. She may defend against his attack in accordance with the defence permissions of his combat manoeuvre: no defence on All-Out Attacks; a limited defence choice between a Dodge and either a Block or a Parry with the non-attacking arm's weapon on a Move and Attack (Block only if using the Basic Set), defence with benefits if using All-Out Defence (Dodge).