Martin Woods, Paul Quinn and Raffaele De Vita scored for County to seal their first points at home in over three months, while new signing Conor Grant and Fraser Kerr netted for the visitors.
And County will feel they deserved their victory despite a tepid start.
Ian Baraclough’s side came agonisingly close to an early goal when Lee Erwin’s volley from 25 yards whistled just past the post.
County, who started with Mark Brown in goal, had their keeper to thank when he kept out Dom Thomas’s effort.
That sparked the hosts into life and they went close through Liam Boyce and Scott Boyd, whose efforts were saved by goalkeeper George Long.
And they broke the deadlock on 35 minutes when Woods lashed in a stunning volley after a one-two with Boyce.
The Staggies made a bright start to the second half with Jackson Irvine going close with a bullet header.
Irvine then missed a gilt-edged chance when he failed to find the target with the goal at his mercy.
And Well punished that miss by equalising on 53 minutes when Grant, on-loan from Everton, curled in a sublime free-kick from 20 yards.
But the home side hit back six minutes later when Paul Quinn nodded in a free-kick to make it 2-1.
And debutant De Vita made sure of the points on 63 minutes with a rasping left-foot drive from Michael Gardyne cross.
Kerr set up a grandstand finish when he headed in Grant’s corner 12 minutes from time to reduce the deficit.
But County clung on for a much needed victory which sees them remain bottom of the table but close the gap with 11th-placed Motherwell to three points.