You signed a contract where you agree to not have pets and the landlord agreed to let you live there. If you decide to not follow your end of the deal, the landlord might not either. In simple terms, you can get evicted. There is probably a clause in the contract to the effect of "you will get evicted if you don't follow these rules".
Depending on contract and local law, you may also be fined, forced to remove the pet, or have your security deposit withheld. One reason landlords don't want pets is that pets leave odors and fur in the apartment, requiring costly cleaning. Not to mention some cats love tearing up the carpeting and otherwise destroying the property. Thus the deposit is used to "repair the damage" caused by the pet. Some landlords charge an additional pet fee for tenants with animals, so if you secretly keep a pet you are cheating them out of the fee as well.
If you want the cat for several months or more, then you probably shouldn't try to hide it from the landlord. There is a big risk you will be discovered and suffer repercussions. The landlord may also refuse to renew your lease later. In theory, and depending on your tenant, you could claim that the cat was there for a day and it will be removed right away. But as I said, landlords are concerned more about the damage to their property than policing you, so once the landlord gets suspicious (probably already happened since you asked him about it) they could inspect the place and demand you pay for damage regardless of how long the cat was supposedly there.
Well being of the cat is unlikely to create an exception to the contract. However, you could have some recourse by claiming that the cat is an emotional support animal and vital to your well being. I am not familiar with the process for this in Austria, but presumably it will involve paperwork from a psychologist verifying the fact. Simply saying you really like the cat and don't want to give it away will not be a sufficient reason - you initially agreed to not have pets, so it can be argued that you should not have taken one in to begin with.
I love cats too, but you probably shouldn't do it if your landlord already told you no. You could end up in a situation where you are forced to put the cat in a shelter, which wouldn't be good for the cat. If your landlord won't budge, your best option is to move somewhere else.