I think a colleague deserves authorship but my PI doesn't agree

This is an extremely sensitive issue that must be handled with care. Although no decision can be stated black or white, there are a few things you ought to keep in mind before making it.

The decision you make depends on your morals, survival and comfort.

Assuming X to be the contributor in question whose name is being excluded from the author list in the first place, let's first review through the possible options you have:

  1. Discuss this issue a little deeper with your PI. Inquire about the guidelines of authorship on her point of view (as suggested by @FábioDias). Ask why should be a contributor's name be omitted while a non-contributor be included, in a diplomatic way of course.

This option could worth a try as you wouldn't be directly opposing the choice made by your PI depending on how diplomatic you are in your conversation. Try to understand the rationale behind her decision. Her experiences may clarify your views on what an author is to be. Though this may make you a little uncomfortable by asking this, choosing this option shows that you value your morals and keep you at a relatively good term with your PI too.

  1. Discuss this covertly with X's PI. State the situation and let the two PIs come to a conclusion. Or, discuss this with another trusted faculty member of the same institution.

The covert part might not always work out right. This could backfire on you quite badly if the other abrasive PI do not agree with your condition of anonymity or if your PI comes to know of this by other means.

  1. Try to strongly convince your PI to include X's name in the author list of the paper. If not, go against your PI and submit the paper with the list of authors you choose (provided you are the corresponding author).

By doing this you are really staging a protest here. The next objective would be then find a different PI who matches your ideals. Frankly, I don't know of many prospective PIs who would welcome rebels. You may have to endure quite a long cold war. By choosing this option you are making a point that your value your morals far more than the survival in the institution.

  1. Tell your PI that you would not submit unless X's name be included.

Now, this does seem rebellious too but not as strong as option 3. Ultimately you may even have your paper published even without your own name in it (a very unlikely event).

  1. Just do as your PI instructed and ignore that any of this had happened. You don't include X's name and publish the paper.

This is the safest option if you want your rapport with your PI to be smooth in the future. Choose this if your survival weighs over your moral in this case. How much discomfort you feet in the end about yourself depends on your mindset.

There may be more options to this, but at any case, think through this carefully and make a decision based on what matters to you the most.