Williams was born in Westchester County, New York, the daughter of Linda Barbara (née Payne), a fundraiser for The Michael J. Fox Foundation, and Gurney Williams III, a freelance health and science writer. She is the younger sister of actress Kimberly Williams-Paisley and is sister-in-law to country music star Brad Paisley.
Williams attended Rye High School in Rye, New York. In May 2001 she received her Bachelor of Fine Arts from the Boston University College of Fine Arts School of Theatre.
Williams married producer Neal Dodson on May 29, 2011. They have two sons: Gus Williams Dodson (b. October 5, 2014) and Odie Sal Dodson (b. May 17, 2017). In the summer of 2016, Williams was two months pregnant and suffered a miscarriage. She partnered with the Human Development Project to speak publicly about the experience, in hopes of reducing the stigma of miscarriage and encouraging more women to talk openly about it.
Williams made her big-screen acting debut in a non-speaking role in the 1993 ensemble comedy-drama Indian Summer, which also featured her sister. She then spent from 1994 to 1996 playing teenage Danielle Andropoulos on the soap opera As the World Turns.
Williams had a role in the television series Good Morning, Miami (2002–2004). Since then she has also appeared in episodes of Psych, How I Met Your Mother, E-Ring, Huff, Law & Order: Special Victims Unit, Side Order of Life, The Mentalist and Warehouse 13. In May 2003, she had a guest starring role on American Dreams, playing singer Sandie Shaw and performing Shaw's 1964 hit "(There's) Always Something There to Remind Me" on American Bandstand.
In 2006, she starred in the Off Broadway play Burleigh Grime$. and appeared as Victoria, a cupcake baker, on six episodes of the television series How I Met Your Mother; a role reprised in the concluding seasons of the show.
In 2010, she starred in the made-for-TV Lifetime movie, Patricia Cornwell's The Front, which premiered on the channel on April 17, 2010. She also won an on-line straw poll conducted by the How I Met Your Mother production staff as to which ex-girlfriend of Ted Mosby, the show's main character, is the fans' favorite. Her character, Victoria, won 128 to 117 over "Robin Scherbatsky", with a smattering of votes for other candidates.
In 2011 and 2012, she played the role of Claire in a film adaptation of Something Borrowed and reprised her role as Victoria on How I Met Your Mother.
She made her Broadway debut in John Grisham's A Time To Kill playing law student Ellen Roark, on September 28, 2013, with opening night on October 20, 2013.
Beginning in 2015, Williams stars as a fictionalized version of Jim Gaffigan's real life wife in The Jim Gaffigan Show, a sitcom about a couple raising their five children in a two-bedroom New York apartment.