Because of his own "meeting" with Palpatine Yoda knew just how strong in the force he was. For Vader he knew at least what Anakin was able to do (and very probably also that he was very diminished from what he could have been).
If we take all we know from the prequels and also Lucas own statements into account Anakin....fully trained as a jedi knight and without his injuries would have been stronger than the emperor (now he was only 75% of what the emperor was able to be).
With that taken into account Yodas statement that Luke who had the same potential as Anakin...fully trained should be able to beat the emperor.
What is more though is that Luke didn't have the disadvantages of the Jedi (being trained in the wrong way....aka getting too prideful and also his abilities diminished due to being the whole time just above a convergence of the dark side like the jedi temple). So that also works in Lukes advantage there.
And then there is one other point that Yoda has learned and which is speaking there
with the force as his ally
that is something Yoda learned the hard way too. IT had to be the will of the force that Luke wins. And of that he was sure as he had learned to listen to the force (aka loosing his Pride and understanding the true nature of things in Episode 3 and also learning to listen to force ghosts himself and how to become one with the force,...). Thus Yoda saw clearly now more than ever what the force REALLY wanted (although he still did not understand HOW it wanted things to happen....for example that it was Vader in the end and not Luke who destroyed the emperor).
So all in all he was right and did not lie.....at least when it comes to Luke. If he had said that to any other Jedi (with a less count of Midiclorians) he would have lied.