When drugmakers say that they plan to appeal rejections of marketing applications, Fools usually have a good laugh and then make fun of them in public. It's not like there's some higher court or anything and appealing to the people who just rejected your drug is like running on a treadmill -- it uses a lot of energy and generally gets you nowhere.

I still plan to laugh at their expense, but I'll have to append all discussions with the story of Gilead Sciences' (NASDAQ:GILD) Cayston -- one of those rare instances where an appeal actually worked.

In fact, Gilead managed to persuade not one, but two regulatory agencies to turn their frowns upside-down and approve Cayston, an inhaled drug to treat lung infections in cystic fibrosis patients. The EU's Committee for Medicinal Products for Human Use reversed its decision last year and the Food and Drug Administration followed suit yesterday with an approval after rejecting the drug in 2008.

The story is even more impressive because Cayston is an antibiotic, a class of drugs that many companies, including Theravance (NASDAQ:THRX), Pfizer (NYSE:PFE), and Johnson & Johnson (NYSE:JNJ), have recently had trouble getting past the FDA. Because of that, even after a positive advisory panel meeting late last year, I wasn't all that confident in an approval.

Cayston expands the somewhat limited options for patients -- Novartis (NYSE:NVS) also has an inhaled antibiotic, Tobi -- so that might have had something to do with Gilead's turn of fortune. The active ingredient is also already on the market as an injectable antibiotic which was developed by Elan (NYSE:ELN) and Bristol-Myers Squibb (NYSE:BMY), so the FDA may have had a little more confidence in the pharmacology.

Gilead's revenue growth is still dominated by its HIV drug franchise, so don't expect the approval of Cayston to affect things much. Still, after the recent flop of its blood pressure medication, it's nice to see Gilead able to execute its plan to diversify away from HIV drugs.

How's this for a turnaround? Learn how to become a terrible investor in order to become a great one. Morgan Housel explains.