How to Gain a Cat's Trust
To gain a cat's trust, be very still when you're around the cat so that it doesn't see you as a threat. Then, slowly crouch down so that you appear less intimidating and make sure to avoid eye contact, which can be perceived as a threat or challenge. At this point, you may be tempted to pet the cat, but stay still and let it come to your when it's ready. Additionally, keep in mind that you may have to repeat this process over a period of days or weeks before the cat fully trusts you.
Understand your cat's mindset. You won't be able to force your cat to do anything, let alone to trust you. Instead, the cat has to be convinced that they'll benefit from an action. For example, maybe they'll give up their nap if you offer them their favorite treat. Don't be offended if they decide not to be persuaded. By nature, cats often choose to remain aloof or unpredictable. Your cat will have a harder time accepting you if you're chaotic and noisy. Cats dislike stress, noise, or a lot of activity. Your cat will accept you faster if you're calm and relaxed around them. Allocate room and places for your cat. A good way to make your cat comfortable is to give the cat their own space. A comfortable, warm place to sleep, eat, play and excrete/urinate. Another point is to look in pet stores and maybe even ask staff about cat shelves. These can be nailed to a wall in whatever position suits you and your cat so they have somewhere to look over the room and feel safe up there. Offer space for safety and exploration. There will be times when your cat feels insecure, scared, or anxious. Give them plenty of hiding places to go to when feeling frightened, like a closet or spot under the bed. It's fine to know where their hiding place is, but don't force your cat out of it unless you absolutely have to. You should also make sure your cat can access high perches (like window ledges, furniture, or a high cat scratch platform) and toys for when they're bored and want to look around or play. Immediately creating a safe and secure place is important. If you're trying to gain the trust of a new cat, keep them in one room so they can get familiar with their territory without feeling overwhelmed. You should also take care to set the litter box in a private corner of the room. It should be away from anything noisy, like a dryer) and she should feel protected when she uses it (the 2 walls will offer this protection if it's in a corner). Give food and water. Feed your cat on a regular basis so she understands that you provide food and shelter. When you set the food down, talk in a soft sing-song voice so she starts recognizing your voice and associating it with something positive, like mealtime. When your cat comes over to eat, back up and give her plenty of space. If you'd like to keep her company, sit down on the floor so you aren't towering over her, which could intimidate her. Make sure your cat can easily get to the food and water dishes. If she's shy, set them within reach of her hiding place, so she doesn't feel too traumatized or stressed by going out to get them. Help your cat to relax. Your cat may have trouble relaxing or feeling calm in a new environment. You can purchase a synthetic cat pheromone product (like Feliway) to diffuse in the room. This is a synthetic version of the chemical messengers a mother cat gives off to make her kittens feel safe and secure. The pheromone can reduce overall stress and can help the new cat settle in faster. You might also consider getting your cat used to your scent as something familiar. This will help her recognize you when you start to make physical contact. For example, you might try letting your cat sleep with one of your old T-shirts that has your scent on it. Offer positive reinforcement. A cat might be frightened of its new surroundings, regardless of how cozy you've made it. This is especially true if the cat was abused or neglected. Never yell at the cat when you notice her doing something she shouldn't. Chances are, she's just exploring her new environment. Instead, use a calm soothing voice to praise her for any good behavior she shows. If your cat still seems frightened of her new surroundings, make sure that you're not scaring her. Never sneak up on your cat or make sudden movements that may catch her off guard. Cats that have been abused are more likely to be skittish, when you surprise them. Watch for signs that your cat is ready for contact. Always let your cat come to you, rather than approach her. If you clearly see that your cat appears tense and is watching you intently (standing, tail stiff, pupils dilated), do nothing. Sit very still, preferably with your eyes closed. You'll be less of a threat this way and the cat will get used to your presence. On the other hand, if your cat is ready for contact, she may: Stay in your sight after she finishes eating, instead of running for cover Take a few steps towards you Sit near you and wash (which shows she's relaxed) Sit with her back to you (which shows she trusts you) Appear less threatening. There are several ways you can appear less intimidating and make your cat feel more comfortable. Lie down, if space allows. Being on her level keeps you from towering over her. Avoid eye contact, since direct eye contact is a challenge or threat display in cat language. Instead, turn your head aside and look away. If you wear glasses, you may even want to take them off since the lenses can look like large eyes to cats. This may look like a threat. Let your cat set the pace for contact. Don't feel like you have to rush things. Eventually, your cat will begin trusting and approaching you. When this happens on a regular basis, the cat will then voluntarily bump her head against your hand or body. This bumping puts her scent onto you and shows that she's accepting you. You can encourage your cat to come closer to you by offering tasty treats. Rest your arm on the floor and scatter a few treats around you. Let the cat pluck up courage to come and eat the treats. Gradually, set treats closer to you so she can approach without feeling threatened. Create a positive environment between your cat and other pets. Allow them to play or eat near each other. Of course, this will be a whole other process as you will have to start from a longer distance and move them closer each day. Of course it would be helpful to have someone else involved in this. Rub her ears or chin. When your cat signals (by bumping her head against you) that she's ready for more contact, you can rub her ears or chin. Take it slowly and start by just extending a single finger to rub her. Don't make any sudden movements, and as her confidence builds, you can scratch her chin. Avoid rough-housing, since cats don't like it. Spend time playing with your cat. When your cat starts approaching you regularly and purrs when you cuddle her, you can stop lying down around her. Sit up and cuddle her. She may even start to sit on your lap, which shows she completely trusts you. Make playtime a regular part of your daily routine. This will strengthen your cat's bond towards you and she'll expect this attention from you. Studies have also shown health benefits for humans (such as lowered cholesterol, lower blood pressure, and less anxiety) from touching and talking with pets. Watch for signs that your cat needs space. This is especially important if you're rehabilitating a cat that has been abused or neglected. You may find yourself cautiously petting the cat, when all of a sudden, she bites you. This, along with surprise scratching, might mean that your cat is overwhelmed by the physical contact or affection. Give the cat some time on her own to calm down, since she's probably surprised too. Next time, avoid petting her for as long. Never punish the cat by yelling or hitting. Cats won't understand why you're hurting them. Instead, remove yourself from the situation for a while. Ensure that your cat gets enough exercise and play time. If your cat tries to scratch or bite you, this usually means that they have energy to burn. Allow for some play time with them at least once a day. A good time to do this is before you go to bed. This burns their energy which will help them associate that time of night with winding down and going to sleep just as you do. 
Understand your cat's mindset. Allocate room and places for your cat. Offer space for safety and exploration. Give food and water. Help your cat to relax. Offer positive reinforcement. Watch for signs that your cat is ready for contact. Appear less threatening. Let your cat set the pace for contact. Create a positive environment between your cat and other pets. Rub her ears or chin. Spend time playing with your cat. Watch for signs that your cat needs space. Ensure that your cat gets enough exercise and play time. 