Don't allow yourself to be browbeaten.
The flat should have been serviceable, and after comments made about the damp, etc., it should have been dealt with. As it was not, I believe (speaking as a non-solicitor) that you have a reasonable case for refuting the claim and possibly for counter-claiming (as suggested by the solicitor).
I think you should go back to the solicitor, check whether what I and others have said is viable, and then write (or get the solicitor to write!) refuting the claim and if you wish, counter-claim.
Be prepared to sue for harassment if they persist in threatening you with a CCJ. They are NOT allowed to keep pressing you for the money without first getting the court's agreement that you are in default.
Do make/find all written evidence you can to support your case.
Good luck!