Please refrain from hitting your cat ever again. Not only is it abusive, but also completely counterproductive in the context of behavioral training because a cat would not even realize the causal relationship - I mean a cat would not associate being hit with a concept of punishment for having done something wrong, the only effect of that would be what you observe now: fear, repulsion and distrust.
As for repairing your relationship with the cat: at first please accept that fully recovering your cat's trust might turn out to be impossible. A little cheesy but otherwise clever saying goes that the trust is like a vase: if it's broken you could glue it together but the blemishes would be clearly there and the vase's quality would significantly drop.
While it might not be possible to completely, you could at least partially regain your cat's trust but it wouldn't be quick. Give your cat as much time as it needs and it's traumatic memories should slowly fade out provided all its old mental wounds wouldn't be opened anymore. It probably would be a long process - as his trauma wasn't caused over a single day, neither will be recovering from it. Obviously you can't just apologize to your cat with words, so you would need to show it by your actions and behavior. Please don't be intrusive in the context of keeping cat your company, petting, etc. and don't press the cat into an interaction if it's not willing for it. Slowly and surely your cat might realize that you're not a danger anymore and the relationship should at least partially improve.