It does no good to explain to a "difficult" cat that what you're doing to her is for her own good. The difficult cat is not interested in your explanations. Yet, you love her, and she loves you when it serves her purposes, so you've got to get this damn pill in her.
Step 1: Get a "pet piller" or "pill gun" that has a soft rubber tip and puts your hand at a considerable distance from the end. I was advised by Ace's oncologist that the solid plastic ones are worthless, and I believe her. You can find the soft rubber ones on Amazon and probably not in any pet store on earth. I checked every single last one of them in San Mateo and ended up having to order online. Do not attempt to give the difficult cat her pill by hand, at least not if you value your hand.
Step 2: prepare the area where you will give your cat her pill. You don't want her to have a lot of space to run around and hide under things. Walk-in closets work well. You want a space that is quiet where there's room enough for you to sit comfortably, cross-legged on the floor. Lay out a large bath towel directly in front of where you plan to sit.
Step 3: get everything ready, but make sure the cat doesn't notice. This is critical. Cats are smart, and will quickly associate sounds and behaviours with what happens next. Therefore either distract the cat with something, have your spouse/partner distract the cat, or just be really stealthy. Do not let on what you are about to do. If you need gloves to handle the pill, put them on now. Put the pill in the pill gun, and prepare a small syringe (no needle obviously) of 2-3cc of water. Place the pill gun and the syringe to the right or left side of where you will sit, depending on whether you are right or left handed.
Step 4: retrieve and prepare cat. The quicker you complete this step, the better. Take her into the space. Sit on the floor with your ankles crossed in front of you. Throw the bath towel across your legs. Put cat between your abdomen and ankles on top of the towel. Flip the edges of the towel over the top of the cat so that you get a kitty burrito with her head exposed. If you do this step right, the cat can't back up, because she'll run into you, and she can't jump forward because your ankles are there and she's wrapped in a towel.
Step 5: everybody get calm. This includes you. This is perhaps the hardest step, but don't skip it. Scratch your kitty's ears, rub her chin, give her a kiss. Take a deep breath. Talk to her sweetly. She'll appreciate the tone of your voice, and the more calm you are, the more calm she will be... for a difficult cat.
Step 6: position the cat's head. You can use two hands to get the initial positioning, but eventually you're going to hold her head with your non-dominant hand's thumb and index finger. Using your non-dominant hand, grab the sturdy cheek bones just under the beastie's eyes. Rotate her head away from your hand- if you're right handed, you're using your left hand, and rotating kitty's head to the right. As you rotate, turn her nose toward the ceiling. Try to get her looking as far up as you can, but looking straight up isn't essential. Rotating to have her look up is essential. You want to be able to see the teeth along one side of her mouth, and she isn't going to like being yanked straight back.
Step 7: get the pill into the cat's mouth and clamp it shut. This is hard, but you can do it. Using the soft rubber tip of the pet piller, part kitty's cheeks so you can see the gap in her teeth directly behind her sharp, menacing canine tooth. This is your target. If you can get the piller to go through this space, she will automatically open her mouth. When she does, work quickly! Get the piller tip back into her mouth, push the plunger swiftly with your thumb, withdraw the piller and with the middle and/or ring finger of the hand you're using to hold the cat's head, clamp her jaw shut and hold it. Whew!
Step 8: along the same spot where you got the piller in her mouth, slowly and steadily drizzle 2-3 cc of water from the syringe to make her swallow. Some sites say blowing in the cat's nose will make her swallow, but do you really want your nose that close to the difficult kitty's sharp teeth right after you stuck a pill in her mouth? I don't think so. It doesn't work anyway. But swallowing water does.
If at this point, the cat spits out the pill, go back to Step 5, and try to get the pill further back in her mouth next time by getting the piller in more deeply or pushing the plunger harder/faster so it pops back in there deeper.
Step 9: begin saying the name of your cat's favorite treat, and take her to have some. Don't skip this step! The more consistently you reward your beastie for taking her pill, the easier it becomes (gradually). The key here is to begin saying "treat!" or "tuna!" or whatever, right away, so the cat builds an association between taking her pill and getting a treat.
Through trial and error, I've figured out what works for Ace Kitty. That is not to say that it's become easy or simple. It's still difficult, just like her, but it's not impossible. We still have an occasional frustrating experience. She still manages to spit out her $4-a-pop pill half the time. But we do manage to get it in her each time. You may have to adapt these suggestions to get something that works for your critter. Good luck!