One of the main reasons why Yoda would've won against Anakin is simply because he was far better trained than him. Yoda could see the moves his opponents were going to make before they made them; therefore, battling against Anakin would've put him at a far heavier advantage.
Yoda's dislike of Anakin was limited to his reluctance of allowing Anakin to be admitted into the Order. He sensed Anakin's fear of loss early on. This could've been helped if Yoda (and the rest of the council) weren't stuck in their traditions that ultimately pushed Anakin further into the Dark side.
Qui-Gon Jinn is seen by many as the best of the Star Wars prequel era's Jedi, and there is evidence that he could have even stopped Anakin Skywalker from falling to the dark side of the Force.
In their primes, Yoda would win handily. Though he took the title/name prior to being cut down by Obi Wan, I'll assume the question implies the 'cyborg' Darth Vader (versus the 'fallen' Anakin Skywalker who attacked the Jedi Temple, though in truth, it wouldn't matter much if we compared either version).
While Yoda sensed that the Sith's plan involved the Clones, it was too late to prevent Order 66. Instead, he placed his faith in the Force and allowed the dark events to happen.
He was still completely unaware of the Sidious/ Palpatine connection until ROTS. He also said during TCW season 6 that the Jedi order must believe in the clones and end the war before the Sith's plans are realized.
Without Order 66, Palpatine would definitely lose. If Order 66 happened but not for some of the most powerful Jedi and the more battle-hardened and experienced Clones, Palpatine still loses even though many Jedi are killed.
Jedi Master Yoda is the most powerful of them all. This should come as no surprise, as he was the head of the Jedi Order in the prequels and was revered for his abilities during the original trilogy. Yoda's power is unmatched and was a real threat to Darth Vader and the Imperials.
More cunning and devious than all but the most attuned Force-sensitive beings, Darth Bane could more than likely defeat Yoda in a battle of both strength and wit.
In Star Wars Legends and Canon, Galen Marek (Starkiller) is the only Jedi (other than Obi-Wan Kenobi) to put a beat down on Darth Vader/Anakin Skywalker. Galen was secretly trained as a Sith Lord apprentice to Vader, but returned to the light side and the Jedi.
If Anakin went to Utapau with Obi-Wan, they would both defeat Grievous, Anakin wouldn't turn to the dark side, but Yoda and Mace would have to help him and Obi-Wan stop Palpatine. If Anakin avoids the dark side, he would still be with Padme and they would live together with Luke and Leia.
Anakin's unhealthy link between his love and attachment is perfectly explained in Clone Wars: Overlords. He admits “The only love I feel in my heart is haunted by what would happen should (if) I let go.” Anakin is never happy, not even with Padmé, because he is constantly afraid what will happen to him if he loses her.
Qui-Gon Jinn, who is considered a maverick Jedi Master by his colleagues, might have been able to keep Anakin on the path of the Jedi, had he not been killed by Darth Maul.
throughout many of the Legends storylines, Vader sought to hunt down every last Jedi. while Palpatine was no longer concerned with the Jedi. Order, in his eyes, Yoda and the Jedi no longer posed a threat to his role. during the early years of the Empire, Palpatine only sent Vader to hunt survivors.
First and foremost, Obi-Wan didn't want to have to confront and try to kill Anakin, we see this all the way until their final conflict in their duel where Obi-Wan pleads with Anakin to not make him do what he knows he'll have to do if Anakin tries to attack from the low-ground.
Qui-Gon is the key to Force ghost knowledge
Yoda didn't specifically know how this would go down, or to what degree Anakin would cause it to happen, but he was playing a much longer game by Revenge of the Sith, and that's at least, in part, explained by Yoda's Force connection with Qui-Gon's spirit.
Master Yoda has risen above all others to claim the top spot as the most powerful Jedi of all time and the true chosen one according to IGN's audience. He won pretty handily as well, as he was victorious in 89,756 of his 95,243 battles and had a win percentage of 94.2%.
Arguably, Qui-Gon is wiser in some ways, given that he knows how to preserve his consciousness in death. Yoda is wise, but sometimes flawed, given that some of his views align with the problematic thinking of the Jedi of this era.
Most of them were just happy to last longer than 20 seconds against the Grandmaster, and bragged about it to their friends if they could.
Perhaps, the old creature simply forgot. Late in the film, Darth Vader does not recognize C-3PO who is in Cloud City with Han Solo, Chewbacca, and Leia. Although C-3PO is not completely assembled in the scene, he is definitely visible to Vader.
Unwilling to see his son die, Vader gave his life to save Luke, thereby dying as Anakin Skywalker. Anakin ultimately fulfilled his role as the Chosen One and brought balance to the Force, fulfilling Qui-Gon Jinn's belief in the prophecy that foretold Anakin's destiny.
Windu Knew Yoda Was More Powerful Than Him
Palpatine was right, from one perspective. Yoda was unmatchable in combat, and he was probably the best teacher the Jedi Order ever had. He had a reason for everything he did, including speaking backward.
Dooku, wanting more power, took up the mantle of Darth Tyranus. If he had stayed exiled on Serenno or stayed with the Order, Sidious would've been without an apprentice. Knowing the Dark Lord, he probably would have tried to find a place holder as Anakin was still too young to approach.
So a confrontation would have still occurred. The only difference is that the Jedi would not have had the heads up that he was actually a sith. But Anakin would not have been there to intervene. Even if Palps still defeated Windu and the rest without Anakin, he would have been forced to implement order 66.
The latest Star Wars tie-in novel confirms Qui-Gon Jinn was the one Jedi who could have stopped Palpatine and even saw his plans in action.