In the episode Extremis, the Pope shows up and is speaking his native language (naturally). However, his words are not being translated by the Tardis. Why is this?
We don't actually know this is the case.
After reviewing the scenes, there's nothing that proves that the people who should normally understand the Pope thanks to telepathic translation, don't understand him. Yes, someone translates for him on a couple of occasions, but they don't know the Doctor's ability to understand. Otherwise, Bill is more concerned with the Pope being in her room and doesn't even seem to particularly care what he was saying. So it's unclear if she understood him or not.
What is clear is that his words aren't translated for the audience. And there are two potential reasons for this: One, from an out-of-universe perspective, that they thought the scene would be more impactful or funny if he wasn't speaking English, and one which could potentially be a clue, at least in retrospect for secrets revealed later in the episode.
As we discover later in the episode,
everything we see, other than the beginning and ending with the Doctor (and presumably the flashbacks), takes place inside a simulation.
both we, the audience, as well as the Doctor, are not part of the simulation, but experiencing a sort of filtered imaginary view of things. The glasses have a record of the Pope speaking, presumably in his native language, and the TARDIS might translate it (or consider it a recording, which may be subtly different, just like written words sometimes aren't translated for companions, or at least not consistently) for him, but we the audience saw things that are presumably outside of the Doctor's glasses recording, including the most notable instance of the Pope speaking (where he encountered Bill and her date).
You could argue, from a metafictional perspective,
the TARDIS translates for the audience as well, but since the Pope spoke inside of a simulation, while the simulation-TARDIS might have translated the language for the people in the room, we, the audience, are two levels removed from it (watching a fiction of a fiction, instead of only watching a fiction), only the real TARDIS could translate for us, and it didn't appear in the episode.
This interview with Stephen Moffat will answer your question.
Moffat: Well, the scenes just worked better with the Pope speaking Italian and being translated. I did write in the Doctor saying he didn’t really need the translation, and Nardole suggesting that he play along out of courtesy – but it glitched the scene, so I lost it in the edit. In fairness, the Doctor’s translation ability has wobbled before, so it’s just having another off moment. I tell myself it’s because of the blindness, and the concentration involved in interpreting the world through his sonic sunglasses. (Hooray, they’re back – a nation cheers!)