To win against 6 zerglings with just 4 zerglings is almost impossible unless you have really, really good micro and the other guy doesn't even look at it. But if you focus too much on the battle you will lose focus on your macro, so you might forget to build more drones or zerglings which hurts more than losing a few zerglings.
I would retreat if possible, but if the fight is in your base then get 2-3 workers into play or just run circles until you have more zerglings or a spine crawler.
If you really, really just want to win that battle it helps if you split your zerglings and attack from 2 sides and focus fire. Retreat the wounded zerglings and attack again if the enemy stops attacking them. Try to circle the enemy zerglings one by one. You will most propably still lose, but you might kill 3 instead of just 2 zerglings.
Before we discuss counter builds, let's talk about what an early Zealot rush is:
"my defenders got wiped by 4-5 zealots and more and more zealots kept pouring in and eventually killed me"
This is the dreaded 2 Gate rush.
Your first goal is going to be identifying it. Luckily this is fairly easy to do. If you scout with your 12-13th drone/probe/scv you should get to your opponents base while his first Gateway is still building, worst case while his second is. All 2 Gate rushes start the same: Pylon, Gateway, Gateway, Pylon. This makes them very easy to pin down. If you see that second Gateway go up before the Cybernetics Core you know he's playing some sort of rush (pro tip: you can click on a Protoss building warping in to see what it will be). If he does a delayed rush, chances are you'll already be in a better position to defend, so you really want to watch out for this early rush.
The attack that will come should be 5 Zealots with 2 more in route (obviously he may wait for more or less, but this is the best time for him to attack).
As Zerg a 2 Gate opening is one of the scariest things to deal with (right after Hellion harass into Mech). If you fast expanded, use the expo as a damage soak and cancel it before it gets killed (if you can). Ideally you'll want to keep that expansion alive as his economy will already be devastated. When you scout a 2 Gate, you'll want to build a Spine Crawler almost immediately. Additionally, a Roach Warren is also recommended. Roaches are very strong vs Zealots (slow attack and starting armor vs a unit with fast attack) and if you can position some by your ramp or other choke you can cut the surface area of your Roaches in half. If you're already into a more speedling based build, then you're going to want to wait for him to surround your Hatchery or engage your Spine Crawler. This will naturally give you a very nice surround on his units as they will spread out. I also recommend bringing your Queen along for ranged dps (and to infuse the Spine Crawler).
The key thing for Zerg about repelling a 2 Gate play is the recovery. Early 2 Gate is so effective that even though he is putting himself at an economic disadvantage, he may do enough damage to your economy to win. You'll want to do the following: Put an Zergling outside his based (this is a scout for his next move); Tech to Roach or Hydra or Muta, as 2 Gate will likely lead into 3 Gate, 3 Gate + Robo or 4 Gate; Power drones, this one is key as he's making a huge economic sacrifice to push with 2 Gate and you need to exploit this for victory.
Terran traditionally have less problems with 2 Gate as they can usually wall off before the Zealots get there. If you already have Vespean Gas then its ok to go for Marauders with Concussive Shell, however, if your strategy didn't include that, you're going to want to skip add-ons and throw down a second Barracks when you scout the second Gateway. With Marines faster build time, you can create a tough Marine force behind your wall well before his Zealots arrive. This ruins the fact that he made an early sacrifice to go for a Zealot push and should give you command of the match. From here is very easy to transition into an MMM or even BioMech which should give you a quick victory.
As Protoss you're going to also want to wall, stick a Zealot or two in the opening and push for Stalkers. If you can have enough 1 Stalker out and your opening plugged before he gets there, chances are you've already won. It is not unusual, upon seeing a 2 Gate, to throw down a second gateway yourself. As defender you'll naturally have the advantage as his troops have a longer rally distance, and you can control the choke. If you push out an early Sentry, he'll probably Rage Quit and call you a cheater.
Now if you're dealing with a Proxy Gate (which is different than a 2 Gate) you have slightly different things to watch for. Lack of Assimilators and Pylons in his base are your best clue. At this point you'll want to start taking your scout and covering all the corners of the map. Additionally move a scout to outside your natural or the nearest Xel Naga tower.
Best Answer
If the Zerg build you are talking about is the Stephano build, or at least close like it, then this answer should help.
What it is
The stephano build as it is called involves the Zerg player fast expanding to 3 bases total when your opponent sees you with a FFE. The object is to get a clear economic advantage over the protoss because it is said that zerg on the same number of bases as the protoss, will lose. Once the zerg reaches about 8 minutes he will have: 3 Bases fully saturated, roach speed reseraching, ling speed researching/done, +1 Range reseraching. By 11-13 minutes, he will have a maxed out 200/200 roach,ling army headed to your front door. He can constantly stream this in during the attack which makes it very effective.
How I've seen it stopped
I've been stopped as a Zerg player only a handful of times. This is NOT countered by air. Going for air will take time and my roaches will just kill your buildings before your voids could kill the first 10 roaches or lings. Good unit composition and sentries are the key to stopping this build. If you hold the roaches back with good sentry placement you can get almost free shots at roaches not in groups. You can divide the army and destroy it as it comes in while warping in more troops to deal with the threat. He will eventually have to transition if you come up with enough immortals and stalkers with zealots in the front. Since it is super hard to transition out of this build you will have a good window of time to come in and destroy with archons, zealots, immortals, stalkers, and sentries. He will only still have roach while he is trying to get an Brood Lord army. As for the spine crawlers, its not part of the build. He must have added that in but the basis is still the same, focus fire them quickly if you have a huge problem with that.
Sources
Liquidpedia
Day[9] Daily #472