The only down side for the Bantams was the sending off of defender Nat Knight-Percival for a foul on substitute Sam Smith four minutes from the end.
Hopkin said: “I asked the players to make sure the crowd got with us and we scored two goals close to each other to settle us down. We managed the game superbly.
“We started the game on the front foot and the fans got behind us – the atmosphere was electric for the whole 90 minutes.
“Nothing is done, but it is important that we didn’t get cut adrift.
“It was a massive pressure-point game. If we had lost today and other teams above us won, it would have been 10 points (to safety) and seven behind everyone else.”
The Bantams are still bottom, but this win – only their fourth of the season – cut the gap to the fifth from the bottom club Oxford to four points.
Two goals in three minutes midway through the first half settled the match.
David Ball scored the first in the 25th minute with a close range header after Eoin Doyle had headed on Jack Payne’s corner.
Payne scored the second in the 28th minute, sweeping the ball into the net from the edge of the six yard area after Lewis O’Brien squared it into his path.
Bradford City: O’Donnell, Caddis, O’Connor, Knight-Percival, Chicksen, Ball, L O’Brien, K Henry, Payne (J O’Brien 81), Bruenker (Miller 78), Doyle (McGowan 87). Unused substitutes: Wilson (gk), Wood, Devine, Wright.
Oxford United: Eatwood, Hanson, Dickie, Nelson, Whyte, Mousinho (Norman 81), Brannagan, Ruffels (Garbutt 81), J Henry, Mackie (Smith 81), Browne. Unused substitutes: Mitchell (gk), Raglan, Long, James.
Referee: Darren Drysdale