This is a tough one to answer without knowing more information. Buyers are typically in charge of their own due diligence, so this may just go back on you, especially if it was purchased as-is. Seems as though everyone is blaming the title company but if the renovation was complete without approvals, then the city may not have know in order to tell the title company depending on when the property was condemned. I don't know if the title company could have known. I suggest calling your real estate agent, the title company, your inspector, etc... basically everyone involved and see if they can help you resolve. In the long run I would evict the tenants, and work with the city to clear this up as quickly as possible.
Having a property condemed sounds terrible but I have seen a brand new home get condemed because the buyer moved in before a frost free hose bib was installed to get the final inspection. There may be a few easy steps you can do to get this lifted from the property.
Good Luck! Aaron