We study the interfacial electronic properties of a model Si-SiO2-Si structure which is intended to simulate the substrate-oxide-polysilicon stack in metal-oxide-semiconductor devices. The structural properties of this model are shown to match closely those of the real system, as determined by a number of atomic-scale experimental probes. In particular, the model introduced here takes into account the disordered reconstruction at the Si-SiO2 interface, and the amorphous nature of the 2 nm thick oxide. For this model, we calculate the local valence and conduction band edges within the framework of density functional theory, and show that the width of the electronic structure transition between the silicon substrate and the oxide is about 8-9 Angstrom. Finally, we calculate the typical decay length of silicon-induced gap states and find a value of 1.2 Angstrom for states lying close to the Si band edges. This result is in agreement with experimental measurements of the leakage current through ultrathin gate oxides.