The 24-year-old waited for the right moment to strike as the bunch flew into the finish in Sabadell, and came around Bryan Coquard (Cofidis) late to win the day by half a wheel as New Zealander Corbin Strong (Israel Premier-Tech) took third.
Primoz Roglic (Jumbo-Visma) enjoyed his fourth straight day in the leader's jersey as himself and Remco Evenepoel (Soudal-QuickStep) remain tied in the general classification, with Stage 3 winner Giulio Ciccone (Trek-Segafredo) third 19 seconds back.
"It's been a tough year so far, but to get a win is a fantastic feeling, particularly after a lot of hard work by the team today," Groves said after the finish.
"This victory is certainly for them.
"It was a fairly straightforward run-in, not too technical but a hard day, so there were only a few guys who could really fight for the finish.
"I knew I had to time this sprint right, though, and let him [Coquard] go first and come over the top."
The 188-kilometre stage took off from Llivia with an early ascent of the Category 1 La Molina expected to produce a breakaway, but the peloton stayed together as the race moved up and out of the Pyrenees.
The day's break formed after the descent of La Molina, with five riders going clear including David De La Cruz (Astana), Roger Adrià (Kern Pharma), Nans Peters (AG2R-Citroën), Christopher Juul-Jensen (Jayco-AIUIa) and Torsten Traeen (Uno-X) building a gap of as much as four minutes before the chase formed in the peloton.
INEOS Grenadiers, Alpecin-Deceuninck and Cofidis worked hard and began to bring the break's lead down steadily as the race moved through the Spanish countryside, but it was still at 30 seconds inside the last 10 kilometres.
As the race moved into the town of Sabadell, the peloton finally brought the break into view, catching them with four kilometres to the line as the sprint trains took up formation, a headwind behind them promising a blistering finish to the stage.
Coquard led out the sprint, albeit a little too early as Groves waited and timed his kick better than the Frenchman to come around him and win the stage.
The Volta a Catalunya continues tonight with Stage 5, a 176.5 kilometre mountain course with a hors categorie uphill finish on Lo Port. Watch all the action from 1:30am (AEDT) live on SBS VICELAND and SBS On Demand.