It depends on what infected it, really. A lactobacillus infection? Sure, it will maybe be ok. Some lactobacilli produce some nasty off flavors. Brett? Maybe, if you're into it. There's a host of other bacteria and wild yeast that will make just horrendous flavors. You may have to wait years, if ever, before it tastes good. It may never taste good. If it tastes like bandaids and feet today, it's going to taste like that forever. I can't say definitively it will never taste good but you may be holding your breath for nothing. If it tastes ok now you should probably just drink it now.
I've had a few infected beers that were just awful and got worse. After a year it was like the band-aids just kept multiplying. I should have dumped those. I have a wild ale that when I last brewed it tasted like butter for months. It took two years to develop into something good. I have a wild saison blend that tastes, literally, like sewage after nine months. Last time I brewed it it wasn't this bad after three months but again, it took about two years to turn into something pleasant to drink. I'm about eleven months into the second brew on that one and it will be my last for sure. The flavor is not worth the wait.