Rosmarinic acid synthase is an essential enzyme involved in the biosynthesis of rosmarinic acid (RA), which facilitates the coupling of phenylpropanoid and tyrosine-derived pathway products. Our study identified six SmRAS genes in Salvia miltiorrhiza, with SmRAS1 being the only one functionally characterized to date. Real-time quantitative PCR was employed to analyze the expression profiles of the SmRAS gene family, revealing that SmRAS1/2/4 are predominantly expressed in the roots, which are the medicinal components of S. miltiorrhiza. SmRAS2 and SmRAS4 exhibited significant responses to abscisic acid (ABA), gibberellin (GA3), and methyl jasmonate (MeJA) stimuli, while SmRAS1 had notable responses to GA3 and MeJA. β-glucuronidase (GUS) staining in transgenic Arabidopsis thaliana confirmed a spatiotemporal expression pattern of SmRAS1/2/4 that was consistent with the qRT-PCR results. SmRAS1/2/4 are primarily localized to the cytoplasm and plasma membrane. Our findings suggested that the overexpressions of SmRAS1 or SmRAS4 led to increased levels of salvianolic acid B (SalB) and RA, with a concomitant decrease in the Danshensu (DSS) content, which served as a substrate. In contrast, RNA interference lines exhibited a downward trend in the content of these substances. Interestingly, no significant changes were detected in the SalB, RA, or DSS contents due to the overexpression of SmRAS2 or RNA interference lines. Collectively, our study demonstrated that SmRAS1 and SmRAS4 are key regulators of RA and SalB biosynthesis in S. miltiorrhiza, while SmRAS2′s role appears less impactful, suggesting a complex regulatory network that influences the medicinal properties of this plant.