The Bulls looked likely to become the first team this season to win outside their own country when replacement flyhalf Handre Pollard sliced through the Hurricanes' defense in the 68th minute for a converted try that gave the Bulls a 20-19 lead.
But Barrett reclaimed the lead for the Hurricanes with his fifth and sixth penalties of the match, adding a conversion of Andre Taylor's first-half try for a personal tally of 20 points.
The Bulls rallied from 13-3 down in the first half and outscored the Hurricanes by two tries to one but were finally beaten on goal kicks.
The Bulls produced an outstanding defensive performance to hold the Hurricanes to a 16-13 lead at halftime, though the Wellington-based side – playing at their alternative home venue – had dominated almost every aspect of the match.
The Hurricanes set out to test the Bulls by playing the game at pace and with width in the first 40 minutes and they kept up steady pressure which the visitors showed great character to resist. The Hurricanes also tested the Bulls' defense with a kicking game and won six kick recoveries against a defensive line that was often strained.
But the Hurricanes managed only one try, to fullback Taylor, from a brilliant cross-field kick by Barrett that was knocked into Taylor's arms by winger Cory Jane.
Late errors
After being hard-pressed to clear their territory for much of the half, the Bulls scored a try against the run of play through fullback Jurgen Visser, from a high kick by flyhalf Jacques-Louis Potgeiter. Potgeiter was forced from the field early in the second half with a leg injury.
His replacement, Pollard, made an outstanding contribution when he sidestepped and cut between Hurricanes flankers Faifili Levave and Jack Lam for the try that gave the Bulls their first lead. However, the Bulls made two disciplinary errors late in the match, conceding penalties that were converted by Barrett.
"We played a really good side that almost wrested it away from us," Hurricanes captain Conrad Smith said. "While I thought we showed really good character to stick with what we know well, it almost got away from us.
"It's a tight competition and these games are going to come down to the wire. It was nice to get one go our way."
The Bulls sustained a heavy injury toll in the first match of a four-game tour to Australia and New Zealand but took confidence from a gutsy performance.
"Well done to Conrad and the boys," Bulls captain Flip van der Merwe said. "They really put us under pressure and played us really well.
"We lost a couple of guys early on and made a couple of huge mistakes in our area and that cost us at the end of the night." – Sapa-AP