If you play Zerg very often, you have probably run into the bunker rush, or just not had enough units to move out with, while you opponent sits outside your base. Heck, they might merely be force-fielding your ramp and preventing a quick expand.
Why does this hurt? Larvae. It's what stops Zerg from building to full capacity (even with Queen injects), and allows the contain to continue.
So what do you do?
This situation calls for an in-base hatch. This means building another hatchery inside your main, for the sole purpose of generating extra larvae. If you position it really well, you can use it to spread creep for spine crawlers - but ensure that it can't be hit from below.
Second thing: Get a Roach Warren going. You need ranged units to break a contain, and the Roach is both tough and has decent range (as of patch 1.3, anyway). Zerglings, when you're trying to move through a choke to an entrenched position, are merely a distraction to your opponent. Banelings, however... are also a decent option if they aren't killed too quickly (this is where the distraction comes in handy).
Third: Make sure you're sure you can break the contain before sending out your forces. What stops him from coming into your base is a mass of units ready to eat him. If you throw these away without killing him, you won't have enough time to build more.
Last, do not attempt to build Mutalisks on 1-base! Mutas are far too gas-heavy, and for the few Mutas you would be able to build, you could build FAR more Roaches, which will get you out of the contain.