Episode III drops all sorts of hints to Anakin in-universe. The first serious one happens in the opera house (transcript)
PALPATINE: (continuing) Did you ever hear the tragedy of Darth Plagueis "the wise"?
ANAKIN: No.
PALPATINE: I thought not. It's not a story the Jedi would tell you. It's a Sith legend. Darth Plagueis was a Dark Lord of the Sith, so powerful and so wise he could use the Force to influence the midi-chlorians to create life ... He had such a knowledge of the dark side that he could even keep the ones he cared about from dying.
ANAKIN: He could actually save people from death?
PALPATINE: The dark side of the Force is a pathway to many abilities some consider to be unnatural.
ANAKIN: What happened to him?
PALPATINE: He became so powerful . . . the only thing he was afraid of was losing his power, which eventually, of course, he did. Unfortunately, he taught his apprentice everything he knew, then his apprentice killed him in his sleep. (smiles) Plagueis never saw it coming. It's ironic he could save others from death, but not himself.
ANAKIN: Is it possible to learn this power?
PALPATINE: Not from a Jedi.
For being a normal politician he sure seems to know a lot about the Sith. And the Force. Hmm. Oh, well, I guess he's just saying it for fun or something... Whatever. I'm sure he's still just some nice old man.
Until we get to this scene in Palpatine's office. It turns out Anakin is kinda dense (emphasis mine)
PALPATINE: It is upsetting to me to see that the Council doesn't seem
to fully appreciate your talents. Don't you wonder why they won't make
you a Jedi Master?
ANAKIN: I wish I knew. More and more I get the feeling that I am being
excluded from the Council. I know there are things about the Force
that they are not telling me.
PALPATINE: They don't trust you, Anakin. They see your future. They
know your power will be too strong to control. Anakin, you must break
through the fog of lies the Jedi have created around you. Let me help
you to know the subtleties of the Force.
They walk into the hallway.
ANAKIN: How do you know the ways of the Force?
PALPATINE: My mentor taught me everything about the Force . . . even
the nature of the dark side.
They stop.
ANAKIN: You know the dark side?!?
PALPATINE: Anakin, if one is to understand the great mystery, one must
study all its aspects, not just the dogmatic, narrow view of the Jedi.
If you wish to become a complete and wise leader, you must embrace a
larger view of the Force. Be careful of the Jedi, Anakin. (pausing)
They fear you. In time they will destroy you. Let me train you.
ANAKIN: I won't be a pawn in your political game. The Jedi are my
family.
PALPATINE: Only through me can you achieve a power greater than any
Jedi. Learn to know the dark side of the Force, Anakin, and you will
be able to save your wife from certain death.
ANAKIN: What did you say?
PALPATINE: Use my knowledge, I beg you . . .
ANAKIN: You're a Sith Lord!
ANAKIN ignites his lightsaber.
PALPATINE: I know what has been troubling you . . . Listen to me.
Don't continue to be a pawn of the Jedi Council! Ever since I've known
you, you've been searching for a life greater than that of an ordinary
Jedi . . . a life of significance, of conscience.
ANAKIN: You're wrong!
PALPATINE: Are you going to kill me?
ANAKIN: I would certainly like to.
PALPATINE: I know you would. I can feel your anger. It gives you
focus, makes you stronger.
At this point there's no more doubts that Palpatine and Sidious are one and the same. The only other Sith lord was Count Dooku (Darth Tyranus), and he's already dead. If that wasn't obvious enough, however, this scene removes any doubt
MACE arrives with THREE JEDI to arrest PALPATINE.
PALPATINE: Master Windu. I take it General Grievous has been destroyed
then. I must say, you're here sooner than expected.
MACE WINDU: In the name of the Galactic Senate of the Republic, you
are under arrest, Chancellor.
MACE WINDU and the other JEDI ignite their lightsabers.
PALPATINE: Are you threatening me, Master Jedi?
MACE: The Senate will decide your fate.
PALPATINE: (burst of anger) I am the Senate!
MACE: Not yet!
PALPATINE stands, a laser sword appears out of his cloak sleeve, and
he spins toward the JEDI.
Not only does Palpatine whip out the trademark red lightsaber, he goes all-in on a 4v1 lightsaber duel and kills three of them almost instantly. After Anakin finally turns on Mace Windu, Windu is killed and there's nothing left to doubt. Palpatine bestows the name Darth Vader on Anakin and tells him to kill the Jedi at the temple.