Klay Thompson had 32 points and Stephen Curry scored 23 points for the Warriors, who nearly blew a 24-point second-half lead. Draymond Green added 10 points and 13 rebounds for Golden State, which opened a three-game road trip with their sixth straight victory while matching the NBA's best start through 47 games.
They tied the 1966-67 76ers, who also won 43 of their first 47.
Isaiah Canaan had 18 points to lead the 76ers, who dropped to 7-41 but nearly pulled off the most improbable victory of the NBA season.
Philadelphia trailed by double-digits most of the second half until a 15-2 run late in the fourth quarter tied the game at 105 with 22.3 seconds left. The Warriors won it on their final possession when Curry passed inside to Green, who fired outside to Barnes on the right baseline.
Ish Smith scored 18 points and Jahlil Okafor, who returned after missing two straight games due to illness, had 13 points.
The Warriors tied a franchise record with 26 assists in a dominating first half when they went up 73-54. They seemed on cruise control until Philadelphia's stunning rally.
The 76ers cut the lead under double-digits for the first time after halftime on Robert Covington's dunk that made it 103-95 with 2 minutes, 2 seconds left. A Nerlens Noel alley-oop dunk and Smith 16-footer followed and, suddenly, the 76ers were within 103-99 with 1:01 left.
Curry answered with a driving layup that put Golden State ahead 105-99 with 46.6 seconds left. Following a timeout, Canaan converted a four-point play after hitting a 3 and being fouled by Curry to make it 105-103 with 38.6 remaining. Smith then stripped Curry and finished with a dunk to tie it improbably at 105 with 22.3 remaining.
After Barnes' shot, Philadelphia was unable to get a final shot off after inbounding the ball at halfcourt.
Green, who leads the NBA in triple-doubles with eight, added nine assists in his first game since being picked on Thursday to his first All-Star Game, where he will join fellow reserve Thompson and starter Curry as Warriors representatives.
Golden State actually trailed by seven points early, as Curry missed his first three shots. But the Warriors ran away from Philadelphia in a dominating first-half performance when they shot 65 percent from the field.
Curry finished the half with a reverse layup that drew loud cheers from a Philadelphia crowd that made it look and sound more like a Warriors home game.
Curry's presence brought many unusual sights to the 76ers' home court. Most in the crowd who wore team gear were clad in Warriors logos. Golden State's players, especially Curry, were cheered loudly during pregame introductions while the 76ers were met with only tepid applause.
There's been hardly any buzz at 76ers home games this season, but there was a carnival-like atmosphere more than an hour before tipoff.
A yellow rope lined the outside of the court to keep fans at bay.