The score sparked a good period for the Irish with their fired-up pack making inroads before Sexton landed a drop-goal to nudge his side 6-3 ahead.
O'Connor kicked Australia back on terms at 6-6 and both fly-halves missed further attempts before the break.
Despite the encouraging scoreline, the Irish must have been wary about an Australian backlash in the second half.
Six days earlier the Wallabies had been 6-6 with Italy at the same stage before scoring four tries in 17 second-half minutes to secure a 32-6 victory.
However, Australia were forced on the back foot as Declan Kidney's gutsy Irish summoned a mighty effort.
Sexton landed a 49th-minute penalty to restore the underdogs' lead.
The Leinster fly-half struck an upright with another attempt but O'Gara, on for injured centre Gordon D'Arcy, assumed the kicking duties and slotted over two penalties to put Ireland on course for the upset at 15-6 in the 71st minute.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.