Matt Poole converted two penalty kicks and Brian Ownby -- another freshman -- delivered two goals in the closing minutes to move the Cavs in Friday's semifinals against No. 1 Wake Forest.
Virginia scored three unanswered goals in the second half after going into intermission 2-1 down.
"Tonight felt really good," said Virginia coach George Gelnovatch. "There was a stretch in the first half when we scored and it felt good to get things started. But then there was a stretch when they scored. We had a good talk at halftime and the team responded well."
Wake Forest got an early scare from N.C. State, which went ahead on a goal by Ronnie Bouemboue -- his third in two days -- but the Demon Deacons recovered to win their No. 1-8 clash, 4-1.
"We're very excited to be alive and play another match Friday," Wake Forest coach Jay Vidovich said. "We played a much improved N.C. State team, so we were very fortunate to come from a goal down and get some good scores."
The Demon Deacons (18-0-1) extended their unbeaten streak dating back to last season to 24 games. Wake Forest has not lost since falling to Boston College in the 2007 ACC Tournament title game.
BC and Maryland will meet in the other ACC semifinal after both earning 1-0 wins on Wednesday.