Christian Wade did the early damage, scoring two blistering tries and providing another for Tom Varndell before forwards Marco Wentzel and Tim Payne touched down.
But man of the match Nick Evans, in his 100th Premiership appearance, scored 22 points to lead Harlequins on the greatest comeback in Premiership history.
The reigning champions, back at the scene of their Premiership final victory over Leicester, scored four tries and 29 unanswered points in the final quarter of a breathless match.
After Tom Guest's charge-down try, Evans set up two scores for Mike Brown and then touched down himself before wrapping up an astonishing victory with a penalty four minutes from time.
"I never want to go through that again," said O'Shea, the Harlequins director of rugby.
"I did think the game was gone. Our set-piece was poor, our discipline, they won the contact areas and when we turned the ball over they stung us.
"It was a long way back - but we got a lot of energy from the bench.
"That try Guest scored from the charge-down just gave us a little bit of hope. The more we played, the more we held onto the ball.
"We started winning the collisions, we got our offloading game going.
"We are delighted to get away with that but we know defensively we are miles better than that.
"We didn't bring our game. Thankfully we have got away with it. It is the rocket we need, potentially."
For the best part of an hour, Wasps proved the dark days of last season's relegations struggles are long gone as they ran Harlequins ragged.
Wade was in blistering form and he would have had a hat-trick had he not passed to Varndell after already crossing the try-line, a risk move which drew an admonishment from director of rugby Dai Young.
There will have been nothing but praise for the Jason Robinson-esque manner in which Wade finished his second try, beating George Lowe on the outside.
But Young always feared a Harlequins backlash, even when his men opened a 27-point lead just before the hour mark.
"For 50 minutes we probably played as well as we have done since I have been at the club," said Young.
"We talked at half-time about not switching off and keeping our concentration and how good a team Quins were and that they would keep playing.
"Things that weren't sticking for them first half and were sticking for us, it was always going to change.
"It wasn't a surprise for us. I thought the charge-down kick gave them that momentum and for the last 30 minutes we struggled to get our hands on the ball."
Gilbert has released a new line of rugby cleats. The Gilbert Virtuo 8S is part of the exciting new product. Check it out.
The entire All Blacks apparel line has been updated for 2013/14. Check out the New Zealand All Blacks polo.
The Nike Tiempo is a solid rugby cleat and one of few styles still made from full-grain natural leather.
The Gilbert Blitz 8S rugby cleat is a great cleat at a great price of $69.99. Get a new pair of cleats today.
A cool looking all black rugby cleat with the high performance adidas is known for. Get in the Gear!
Wear the crest of the British and Irish Lions on your t-shirt. A great look for the summer.
The All Blacks Performance t-shirt is black with hints of blue from the training jersey. Very Cool.
The New Zealand All Blacks training jersey for 2013/14. Get in the Gear!
The USA Rugby Pro Alternate rugby jersey is perfect for any fan of the Eagles. Get yours to wear during the summer Test matches.
The NEW All Blacks 2013/14 jersey has arrived at World Rugby Shop. Dare to wear the colors of the All Blacks.