Usually, we try to be polite and not to say unpleasant thing to people in authority. "Speaking truth to power" means confronting authority with unpleasant truths.
In the phrase "speak truth to power," "speak" often means a literal face-to-face interchange. But it can also mean printed or published "speech."
"Power" means a powerful person, an authority, someone who is in charge. It usually means a fairly high authority: a king, a president, the CEO of a corporation.
"Truth" here means something that is true--usually an ethical or moral truth. It means something that the person in power denies or opposes. It is likely to shock the person and make that person angry. Therefore, to "speak truth to power" is to take a serious risk.
An example of speaking truth to power occurred in 1970, when Debra Sweet, a high school student met the US President, Richard M. Nixon. Sweet had been awarded the Young American Medal for Service. This award is presented by the President in person. At that time, the United States was in the middle of the Vietnam War, which was, and remains, controversial. By 1970, many Americans had come to believe that the war was wrong. Sweet was, in fact, an anti-war protester. She decided to accept the invitation, so that she would get a few seconds to speak with the President. She was a nineteen-year-old girl talking to the most powerful man in the United States. Most people--regardless of their views--would have deferred to the President and said something pleasant like "Thank you for this honor, I will cherish it forever." According to Sweet's account, she said:
"'I can’t believe you’re sincere in giving this award for service, when you’re killing millions of people in Vietnam.' We weren’t miked, and I spoke quietly. Nixon, despite make-up, turned completely white, and stammered, 'We’re doing the best we can.'"
That was "speaking truth to power."