SiO2 and TiO2 thin films with gold nanoparticles (NPs) are of particular interest as photovoltaic materials. A novel method for the preparation of spin-coated SiO2–Au and TiO2–Au nanocomposites is presented. This fast and inexpensive method, which includes three separate stages, is based on the in situ synthesis of both the metal-oxide matrix and the Au NPs during a baking process at relatively low temperature. It allows the formation of nanocomposite thin films with a higher concentration of Au NPs than other methods. High-resolution transmission electron microscopy studies revealed a homogeneous distribution of NPs over the film volume along with their narrow size distribution. The optical manifestation of localized surface plasmon resonance was studied in more detail for TiO2-based Au-doped nanocomposite films deposited on glass (in absorption and transmittance) and silicon (in specular reflectance). Maxwell–Garnett effective-medium theory applied to such metal-doped nanocomposite films describes the peculiarities of the experimental spectra, including modification of the antireflective properties of bare TiO2 films deposited on silicon by varying the concentration of metal NPs. The antireflective capabilities of the film are increased after a wet etching process.