Amare Stoudemire had 32 points and 12 rebounds, but scored only two points in the fourth quarter as the Suns struggled to avoid a fourth consecutive home loss.
Barbosa was 6-of-7 on 3-pointers, all in the second half. Raja Bell added 20 points and Shawn Marion 17, nine in the fourth quarter when the Suns finally pulled away.
Three players topped 20 points for the Celtics, who lost their 10th in a row on the road and 20th in 21 games overall. Paul Pierce scored 24, Al Jefferson 23 and Ryan Gomes 21. Delonte West added 17 points for Boston.
The Suns made it two victories in two nights after Steve Nash returned from a shoulder injury following the All-Star break. Nash had 14 points and 13 assists.
The Celtics, meanwhile, became the second team in the NBA to lose 40 games this season. Memphis was the first.
Barbosa was 4-of-5 on 3s in the fourth quarter.
Boston trailed only 98-95 after West's inside basket with 6:45 to play, but Marion scored the first six in a 15-6 run that put Phoenix in control for good. Bell's 16-footer capped the outburst and gave the Suns a 113-101 lead with 2:02 to play.
The Celtics cut it to 113-106 on Jefferson's three-point play and Pierce's two free throws, then Barbosa sealed it with his final 3-pointer a minute from the finish.
Stoudemire scored 18 points and grabbed nine rebounds in the first half to lead the Suns to a 57-46 lead at the break.
Phoenix stretched the lead to 60-46, then the Celtics rallied with a 15-4 surge that cut it to 64-61 when Brian Scalabrine sank a 3-pointer with 7:25 left in third quarter.
The Suns responded with Stoudemire's three-point play, accompanied by Nash's free throw following a technical on Boston coach Doc Rivers. Nash punctuated the 7-0 spurt with two free throws and it was 73-64 with 5:52 to go in the third.
But Boston scored the last six points of the period to trail just 86-82 entering the fourth. Gomes' 20-footer to start the final quarter cut Phoenix's lead to 86-84 with 10:22 to play. Bell's 3-pointer boosted the lead to 89-84 and the Celtics never got closer than three again.
Notes:@ Boris Diaw missed his fourth consecutive game with back spasms, but Phoenix coach Mike D'Antoni said the forward had improved and might be able to play Friday at Minnesota. ... The Suns honored their 1975-76 team that surprisingly advanced to the NBA finals and took the champion Celtics to six games. Players from that team in attendance were Garfield Heard, Ricky Sobers, Dennis Awtry, Dick Van Arsdale, Curtis Perry and Alvan Adams, along with coach John MacLeod. ... Boston outrebounded Phoenix 18-4 in the third quarter. ... The Suns are 21-3 against the Eastern Conference but had lost the last two _ against Atlanta and Chicago _ without Nash.