One of the toughest experiences of my work life was my viva. The examiner picks at every hole in your work and you need to have an answer. Even if the answer is acknowledging it and proposing future work. It's a very useful experience, and when combined with the rest of a PhD, teaches you to be humble and accept that criticism of work is not an attack on the author. I still have nightmares about mine!
From Latin "viva voce", literally 'with a live voice' and roughly meaning 'aloud'.
At my university you also got a 'viva voce' as an undergraduate if your BSc is borderline between two grades. I received one and yes, I got the lower grade.
It's not strictly limited to just PhDs - at my university, I was required to take one for a year-end undergraduate project.