Defense against passwall: fortified walls. Passwall doesn't work through objects as hard or harder than metal. If you're primarily being assaulted in your headquarters then shame on you for not having exotic/hard materials for defensive walls. If you're rolling in money, time, and resources then you could do something crazy -- like have all your walls double-layered with walls of force sandwiched between them (I seem to recall something like this being in the Strongholder's Guidebook?)
If you're being attacked outside your base, or in areas where you can't logically control the building's construction then you probably can't reliably foil the enemy spellcaster's means of transportation. But then it's likely the enemy spellcaster is using magic to divine your location so a detect scrying would at least let you know you just got tagged, winning the CL check is largely irrelevant as her distance won't matter with things like teleport at her disposal. Mage's private sanctum would prevent all the enemy spellcaster's magical divinations (save from the penultimate divination discern location) from working at all -- maybe forcing her to rely on traditional intelligence like spies or contacts.
Dimensional anchor is perfect for preventing unwanted teleportation or plane travel, both on yourself or your enemies -- but it's duration is too short to depend on for permanent protection. Overland flight could give it's caster "immunity" to the gravity trick. Ethereal jaunt would render you safe from all the tricks, but it's duration would either mean prior knowledge of impending doom, or something like a crafted Contingent Spell (with some well worded clauses for execution). Plus said enemy spellcaster with feats like delay spell would then just lead her gate trick with a precisely timed mage's disjunction (if your DM hates you) or a greater dispell magic.
Some mundane precautions may work as well, like nailing spikes into the ground and securing yourself to them with short ropes. You could always rest in a rope trick.
There are several other tricks that you could probably come up with. Remember, the very same spells that this caster uses against you, you can use against them (NPC services or your own), and wizards of that caliber usually have powerful enemies. Perhaps you could find out the name of a particular pit lord this caster's wronged and bargain with it. Maybe the lord of the land could be persuaded to question, imprison, or execute her.