Previous answer was a bit overwhelming. Here's the skinny with a simple remedy for if this happens again.
Hydrogen sulfide (H2S) is the rotten egg odor you smell, and it usually forms at the end of fermentation. Most home winemakers won’t notice a smelly problem until the first racking. If you do smell rotten eggs, the quicker you can act, the better your chances of saving the wine. If your wine is not treated promptly, hydrogen sulfide will react with other carbon compounds in the wine to create mercaptans, and later into disulfides. These are extremely difficult to remove from your wine once they are present, so the faster you can detect and treat your wine for hydrogen sulfide, the better.
Many sources suggest that you add copper sulfate to your wine, but most vintners advise against this. While a very, very, VERY small amount of copper sulfate will take care of your H2S problem, it is poisonous. Big wineries use copper sulfate, but there is a kinder, gentler approach, using chemicals that most winemakers already have on hand.
First, measure the level of sulfides in your wine using a SO2 Test Kit if you can. If the wine is deficient, treat the wine to 50 p.p.m. sulfides.
Next, rack the wine two or three times, making sure to splash it around a lot as the wine is transferred between vessels. This aeration introduces oxygen to the wine, and will help counteract the hydrogen sulfide.
Replace the airlock, and let it sit overnight. This should take care of the problem in most cases, but if it still stinks, perform these extra steps:
Buy a piece of copper flashing from a home supply store.
Hold the piece of copper in the neck of the carboy while the wine is being racked, so that the wine runs over the copper surface and into the carboy. Fine and/or filter the wine.
By now, that stinkiness should be greatly reduced. If you STILL detect a smell, try gelatin finings in the amount stated on the package.
After fining, we suggest running the wine through a filter.
If you’ve taken all of these steps to no avail, you could try using copper sulfate. But BE CAREFUL! Add NO MORE than 0.5 ml per gallon. Afterward, be sure to fine the wine with bentonite or Sparkolloid according to package instructions. Either of these will remove the copper sulfate. Then filter to remove the fining agent.