In your case, you did your best to explain why her sister getting a birthday gift was not grounds for her to get one too, and your position was entirely reasonable and correct. It sounds like you listened to her, took her feelings seriously, and still didn’t back down. This is generally the right approach to take, even though she threw a tantrum.
Many children do tend to throw tantrums when they don’t get their own way, even if we spend hours explaining our position. That doesn’t mean that parents are doing anything wrong. It just means that children may try to challenge a decision and it’s the parents’ responsibility to be confident that they’re doing the right thing and to convey this confidence to their children.
Giving in to tantrums is almost always wrong and counterproductive. By definition they are a method of testing limits and many parents fail to react correctly, resulting in such behaviors persisting. Ultimately, tantrums should be ignored if possible, because even negative attention can perpetuate the behavior; the child needs to get the message that such methods won’t accomplish anything. If a parent backs down in the face of tears or rage, this conveys the very wrong message that this is what works to make a parent retract or give in.
Another important point is to not react to the tantrum by putting down the child, making it an attack on them, personally. Parents should never respond with comments such as, “Look how difficult you are being,” or “What a baby!” etc. This may sound obvious, but sometimes we get frazzled by a child’s tantrum and make an older version of the same mistake they’re making — overreacting inappropriately and causing more damage by personalizing the issue and hurting the child.