According to The Heritage of Virginia: The Story of Place Names in the Old Dominion by James Hagemann, Grottoes was originally called Shendun. It was started when people concentrated in the area to work the iron mines and furnaces.
Iron mining was a quick boom-and-bust operation in Virginia, and Shendun flopped. It was reincorporated in 1912, and the town founders (re-founders?) named it after the caves this time.
Why did they name it "Grottoes" rather than Shendun? In 1912, cave tourism was the big economic spur in Rockingham County and the Shenandoah Valley. No other community in the United States is named Grottoes... but if you check the Geographic Names Information System, you'll see where numerous locations are called "grotto."