We present herein a novel combination of gated mesoporous silica nanoparticles (MSNs) and surface-enhanced Raman scattering (SERS) for sensing applications. As a proof of concept, we show the design of a system comprising MSNs loaded with crystal violet (CV), a molecule with high Raman cross section acting as SERS reporter, and capped with either a suitable DNA sequence for the detection of Mycoplasma genomic DNA, or with an aptamer that selectively coordinates cocaine. In both cases the presence of the corresponding target analyte in solution (genomic DNA or cocaine) resulted in the release of CV. CV delivery was detected by SERS upon adsorption on gold nanotriangles (AuNT), which display efficient electromagnetic field enhancement and high colloidal stability. Using this novel procedure a limit of detection of at least 30 copies µL -1 was determined for the detection of Mycoplasma genomic DNA, whereas cocaine was detected at concentrations as low as 10 nM.