Danni Jordan found the net for the Welsh with just a minute to go, to make the final score 2-1 in Glasgow in the final Test of the series.
Phoebe Richard had equalised just before half-time in a hard-fought encounter after Fiona Burnet had opened the scoring for the hosts.
Wales take the series 3-0 after beating Scotland 2-1 and 1-0 previously.
The dramatic series win was a fitting way for defender Tina Evans to celebrate winning her 100th cap for Wales.
"We're absolutely thrilled considering Scotland are ranked considerably higher than us in the world rankings," Evans said.
"We knew it was going to be a really difficult test for us but we're really pleased with how we've performed in getting three really good results.
"We came here with high expectations and probably exceed them but we're delighted with the performances and the results we've got.
"It was a really special day and it was really amazing to captain today and for the girls to come in and put in that huge amount of effort makes me really chuffed and excited for what the future holds."
Wales are currently ranked 26th in the world and are preparing for the European Championships in Cardiff in August, so will relish an important series win over 17th-ranked Scotland.
Find out how to get into hockey with our special guide.
Wales women hockey came from behind to complete a three-Test whitewash over their Scottish counterparts.