|There are two real problems here: your manipulating co-worker and your pliable boss. Your co-worker is playing a power game, and whether or not she is a know-it all, she certainly knows how to do this. As a result, your boss is buying whatever she is selling, even if it contradicts prior comments or feedback that she gave you.|
In the future, whenever your boss provides positive feedback on your work, you should document it carefully. If your all-knowing co-worker then puts her negative spin on such work, and your boss follows suit, you should be ready to play back your boss's initial positive comments and support your work with additional facts.
Your co-worker has trained your boss to rethink and rescind her comments, so you need to retrain your boss to keep this co-worker away from your work. You can do this by acting assertively and standing up for your accomplishments in a factual and businesslike manner. If you let the current trend continue, you will essentially be reporting to your co-worker. In such a scenario, she would quickly transition from "know-it-all" to "no-it-all."