To realize a more rapid and accurate detection technique for diverse trace molecules, surface-enhanced Raman scattering (SERS) analysis has been extensively investigated in recent decades. However, a practical fabrication method to scalably and reproducibly produce SERS substrates with highly effective SERS-active sites and extensive optical tunability still remains an important research target. Here, we present an electrochemical pathway to generate a high-performance SERS substrate. This method provides not only ultrahigh-density hot spots as a form of nanogaps for strong and uniform SERS signal enhancement but also tunable plasmonic properties for capability of matching the plasmonic resonance wavelength with that of the Raman excitation laser. The unique Au nanopillar array decorated with ultrafine Au nanoparticles records a high SERS signal enhancement effect, which enables trace-molecule detection on the entire measured area with highly reproducible signal intensity. Also, via aptamer-functionalization on this substrate, an extremely sensitive and highly selective SERS-based Hg2+ ions detection sensor is demonstrated. Trace-amount (10 ppb) Hg2+ ions can be selectively identified in a mixture solution containing six different metallic ion species as well as in a beverage containing numerous other components.