We present a new method for deposition of thin nanocomposite films made of sol-gel-based Au nanoparticles using a single electrochemical step. Applying a negative potential to an electrode (indium tin oxide or stainless steel) immersed in a solution of gold nanoparticles stabilized with N-[3-(trimethoxysilyl)propyl] ethylenediamine (EDAS) caused the reduction of the protic solvent, which altered the pH and therefore catalyzed the deposition. The nanocomposite thin films were characterized by various techniques: the morphology and structure of the layers were examined by high-resolution scanning electron microscopy and atomic force microscopy; their thickness was determined by profilometry; and the permeability of the films was studied by electrochemistry. We found that homogeneous defect-free layers could be deposited only upon adding tetramethoxysilane (TMOS) to the deposition solution. Furthermore, we showed that the applied potential, the ratio between the TMOS and the Au nanoparticles, and the type of the substrate significantly affected the aggregation and density of the Au nanoparticles in the nanocomposite. Finally, by applying a positive potential to the nanocomposite films we succeeded to electrochemically dissolve the embedded Au nanoparticles, forming holes and channels. The oxidation treatment had a remarkable effect on the permeability of the film and exposed the electrode to faradic activity. This method seems to be of general applicability in templating of nanometer-sized objects in thin films.