Fly-half Ben Botica only played the first half but his 15 points set the Aviva Premiership leaders on the way to their second victory in the cup competition.
"You can't coach bottle," Quins director of rugby O'Shea said after his side dominated the first half and survived the second to make it two wins from two cup matches. "I couldn't be prouder of that performance.
"We started really well and had great tempo but didn't get the try that maybe some of the play warranted.
"But Bath are a strong side and they were always going to come. We started to lose a number of players with knocks and bruises."
Botica, the 23-year-old son of former Wigan and Castleford rugby league star Frano Botica, was withdrawn at half-time with an ankle injury but 18-year-old debutant Louis Grimoldby, who replaced him, landed the two second-half penalties which saw Quins keep resurgent Bath at bay.
"Young Louis Grimoldby came off the bench for his first senior game - he's been playing at Richmond - and we struggled to keep structure," O'Shea added.
"But he stepped up and kicked goals under pressure when we needed them and in terms of defence we just hurled our bodies on the line. The second half, and the tail end of the first half, we were just soaking it up.
"That, to me, showed more about our group of players than anything else. Were we good second half? No, in terms of ball play, but in terms of bottle and heart we were magnificent.
"We have two wins out of the opening two games in this competition, with London Welsh at home in the next one at the end of January.
"But the defensive-led attitude was just unbelievable and some of the individual performances in that tonight were as good as you will see all season."
Bath paid the price for giving away 21 penalties during the match and defence coach Mike Ford said: "We are going to have to look at the penalties we conceded.
"They had a great start. The last 50 minutes we were in control of the game but we struggled to get over the line."
Forwards coach Neal Hatley agreed: "We weren't great first half and gave away an unacceptable number of penalties.
"We had the majority of possession and territory in the second half but we lacked that last cutting edge. We got a bit inaccurate against a good defensive side."
Gilbert has released a new line of rugby cleats. The Gilbert Virtuo 8S is part of the exciting new product. Check it out.
The Barbarians are one of the top invitational rugby sides with a long history and classic rugby jersey.
The Nike Tiempo is a solid rugby cleat and one of few styles still made from full-grain natural leather.
The Lions get ready for their matches with this green training jersey. It's what the players wear. Get in the Gear!
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.
$29.99
The Lions are ready to get their Australia tour underway. They arrive in Perth on Monday.
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.