Metal-oxide heterostructures have been attracting considerable attention in recent years due to various technological applications. We present results of electronic structure and transport calculations for the Au-MgO-Au (metal-insulator-metal) heterostructure based on density-functional theory and the nonequilibrium Green’s functions method. The dependence of the conductance of the heterostructure on the thickness of the MgO interlayer and the interface spacing is studied. In addition, we address the effects of O vacancies. We observe deviations from an exponentially suppressed conductance with growing interlayer thickness caused by Au-O chemical bonds. Electronic states tracing back to O vacancies can increase the conductance. Furthermore, this effect can be enhanced by enlarging the interface spacing as the vacancy induced Mg states are shifted toward the Fermi energy.