Yoda and Obi-Wan did not tell Luke that the Emperor was specifically a "Sith Lord". However, some of the things Yoda and Obi-Wan told Luke heavily implied that the Emperor was a Sith Lord. The most conclusive one is from Yoda:
Do not underestimate the powers of the Emperor, or suffer your father's fate, you will.
Star Wars: Episode VI Return of the Jedi
From that statement Luke must know that the Emperor has powers, which Luke knows come from the Force.
Later, after Luke gave himself up to capture by the Empire, Luke and Vader converse. Vader mentions that the Emperor is his "master" and that the Emperor knows the nature of the Force:
Vader: You don't know the power of the dark side. I must obey my master.
Luke: I will not turn...and you'll be forced to kill me.
Vader: It is too late for me, son. The Emperor will show you the true nature
of the Force. He is your master now.
Star Wars: Episode VI Return of the Jedi
Luke did not act surprised when Vader told him this, so it seems Luke put two and two together from the statements by Yoda and Obi-Wan and figured out that the Emperor was a Sith Lord (or, at the very least, a powerful user of the dark side of the Force).
Luke's shock (heh) at the Emperor's Force Lightning and the Emperor's statement that Luke has a "lack of vision" can be explained by the fact that
- Luke has never seen Force Lightning (Vader can't use it).
- Luke's "lack of vision" is in the power of the dark side. The Emperor is convinced he's going to win because, unlike Luke, he believes Vader can't be redeemed.