Ridden by Seamus Heffernan, Was started at 20-1 but held on by a neck from 16-1 chance Shirocco Star with the fast-finishing 11-4 favourite The Fugue half a length away in third in the Epsom classic for fillies.
It was a fourth Epsom Oaks success for O'Brien and a huge boost ahead of Saturday's Derby where the Irish maestro runs the heavily fancied Camelot, winner of the 2,000 Guineas last month.
Winning jockey Heffernan, who took up the running with 400 metres to go, told reporters: "I had plenty of horse and I had enough under me to take two lengths when I needed it. I want to thanks the owners for having trust in me."
Heffernan, 40 next month, has been a long-time servant of the O'Brien stable and landed his first English classic.
He said of Was: "She arrived there on the bridle (coasting) and I had plenty of petrol. When you have that you can go where you like."
The race mirrored the Newmarket classic for fillies, the 1,000 Guineas, where O'Brien's 25-1 outsider Homecoming Queen soundly beat stable mate and 13-8 favourite Maybe into third place.
Maybe was well fancied on Friday with O'Brien's 19-year-old son Joseph in the saddle and was sent off 100-30 second favourite but could do no better than fifth, beaten just under four lengths.
Trainer O'Brien said: "Obviously all of my runners are seriously well-bred fillies so anything is possible. Seamus knows all these horses inside out and nobody deserves it more."
O'Brien said of Maybe: "She ran well, she was coming there and coming there but a mile and a quarter (2.0 km) might be as far as she wants to go."
The Oaks, like the Derby, is raced over a mile and a half (2.4 km).
John Gosden, who trains third-placed The Fugue for composer and impresario Andrew Lloyd-Webber, said: "We got badly run into and were lucky not to be brought down early in the race."