Acetobacter bacteria is responsible for vinegar production. This bacteria is a resident everywhere--in the air, on your equipment, and on fruit skins. Did you add some meta to the must on the first day? If not, this may be why you have the vinegar now. Also, all equipment that touches your wine needs to be sanitized with meta solution.
You also need yeast nutrient when fermenting wine and you should not pitch it all in the beginning. It should be divided into 3 doses to keep the nutrients available to the generations of new yeast cells being produced. No ferment should be stinky---if it is, lack of nutrient is almost always the culprit. And it's usually reponsible for stuck ferments,also.
If you have other wines going in the vincinity of this one, you probably want to get it isolated so it doesn't infect your other wines. I've never had vinegar production in a wine and I'm not sure if there is a cure. You could Google the problem--I'm sure you'd find a lot of info on this problem there.