Williams was born in Camden Town, London, England. Her parents are both barristers. Williams was educated at an all girls, independent school in Hampstead in North London, South Hampstead High School, and then she attended the Newnham College at the University of Cambridge. She graduated with a degree in English literature. Nick Clegg, an English politician, attended Cambridge at the same time as Williams.
Williams also attended the Bristol Old Vic Theatre School to study drama for two years, and, in addition to that, she spent three years at the Royal Shakespeare Company. In 1997, after filming The Postman, Williams spent time in Bolivia to study spectacled bears in the rainforest.
For seven years, Williams was in a relationship with Jonathan Cake, a fellow actor. They were engaged, but Cake called off the wedding a fortnight before their planned wedding. For four years, possibly when Williams was in Cambridge, she had a relationship with Radosław Sikorski, the current Polish Minister of Foreign Affairs. In 2003, Williams married African-American actor Rhashan Stone, who was raised in England, and works as a comedian, musician, composer, singer and playwright. She had met Stone through a mutual friend. They now have two daughters - Esmé Ruby and Roxana May.