The full-back latched on to Danny Care's chip to touch down in the 73rd minute and a victory in Connacht next Friday should be enough to secure a quarter-final place.
Brown was one of four Harlequins players called into the England squad this week and O'Shea believes he is putting the pressure on Ben Foden for the full-back jersey.
"It is great for England that you have guys playing at that level," said the Quins director of rugby.
"Browny is playing absolutely outstanding rugby. He has a knack of scoring those important tries.
"It has forced Ben Foden to raise his level. He is playing outstanding rugby. Today defensively he was outstanding and he probably saved Northampton a couple of times.
"If you have competition you have people pushing each other.
"Hopefully Browny gets a look in at some stage during the Six Nations and plays. He deserves to get up to that level."
Gloucester had proved a tough nut to crack up until Brown's try, with the Cherry and Whites cancelling out Matt Hopper's opening try with an effort from James Simpson-Daniel.
Harlequins trailed 14-13 when captain Chris Robshaw three times declined to take the points as Gloucester were penalised at successive five-metre scrums.
On the seventh set piece, Harlequins' opportunity looked to have gone when the ball was kicked out the side of the scrum and Care was penalised for offside when he picked it up to score.
But Harlequins conjured up one last opportunity and Brown's try brought them back from the brink of Heineken Cup elimination.
"That is living and learning," O'Shea said.
"We have a saying on the board 'live by the sword, die by the sword'. It hasn't cost us and we can learn from winning rather than learn from losing.
"This time last year we would probably have lost that game.
"We are enjoying learning what it is like every week to play at this level, with a heck of a lot on the line every time you go out there.
"Teams only get used to that playing matches when you have everything to lose.
"We go into the last round of the Heineken Cup with an opportunity to go through. I know what Connacht are like down there. We will have to be at our best to win.
"We are in with a chance."
Gloucester are now out of the Heineken Cup running but they can still affect the outcome of the group, with Toulouse due at Kingsholm next Friday.
Cherry and Whites boss Bryan Redpath was happy with his side's performance, despite the defeat, and he vowed to name a full-strength side next week.
"Our passion and pride was a lot better tonight," Redpath said.
"We had a bit of dog about us in the contact area. We will take it on the chin that we lost the game but we look forward to Friday at Kingsholm.
"We are going into an international period and this will be the last chance for some players to play and there is no better chance than bringing Toulouse to Kingsholm."
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.
$29.99
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.