The centre-half netted just his second U's goal four minutes into stoppage time to break Barnet's spirited resistance.
James Constable missed three opportunities for the hosts in the first half.
When Barnet goalkeeper Graham Stack dropped Luke O'Brien's corner under pressure, Constable volleyed over from a great position six yards out.
Oxford's joint-top scorer this season then saw a 12-yard shot deflect over, and when Damian Batt invitingly cut the ball back for him from the right, Constable failed to connect cleanly.
The Bees had their own chances and Ross Jenkins' strike from Luke Gambin's cross forced a good save from Luke McCormick early in the second half.
Forward Mauro Vilhete fired in a shot so powerful it broke the netting, with Oxford's groundstaff spending more than five minutes repairing it.
And in the resulting stoppage time, Tom Craddock headed Scott Davies' free-kick into the path of Raynes to nod in from close range.