If you follow this guide and practice the following build, you will NEVER lose to 4gate on maps with a ramp ever again.
Consider 4gate an artifact, some random build you see on TDA and Bel'shir, but never anywhere else.
While 4gate was already on its way out thanks to nerfs and builds that can better handle it, the spreading of the information here should solidify its extinction for those who read it.
1 Gate before Twilight
This build is extremely tight. Your goal is to be able to chain force-field the ramp from the second your opponent has the ability to warp in on the high ground (finished pylon + vision + wg cool downs ready) to the time you can actually engage his army straight up.
17 Core (earliest scout; feel free to scout later)
17 zealot (18 if you scouted on core, 17 if you haven't scouted yet)
20 (2nd) Gas
22 Stalker; no chronoboost
22 WG; Chronoboost x3
24 Pylon (25 if you scouted before core)
26 Stalker; 1 chrono boost
29 Twilight Council
32 (2nd) Gateway (Cut probes at 32 food: 24 probes; 1 zealot; 2 stalkers; 1 sentry)
32 Blink Research (DON'T CB YET)
This will bring you to a few ticks after the 5 minute mark. The build diverges here.
If you're getting aggressively 4gated...
If you're not getting aggressively 4gated...