The Galaxy also got an own goal in the 25th minute. Juninho got his third goal of the year in the 42nd minute for the Galaxy.
Barnett added a goal in the 80th minute.
"Those are never excuses because it is a team game," Los Angeles coach Bruce Arena said. "We have to win games without Beckham, Donovan and Ricketts and that's what we did."
Conor Casey had his third goal of the year as Colorado (5-4-7) had its unbeaten streak snapped at nine.
"We just were lacking in the first half," Colorado coach Gary Smith. "They didn't get out of their half for 25 minutes until then we looked to be the stronger team."
Los Angeles hadn't come close to a scoring chance when the Galaxy scored in the 25th minute. After receiving a pass from Miguel Lopez, Chris Birchall sent a cross from along the end line that deflected off Rapids defender Drew Moor and past goalkeeper Matt Pickens.
"We knew we could get them on the break," Birchall said. "The ball came down right, I tried to catch it before it went out and took a shot from a tough angle and luckily it went in."
"That goal was vital," Birchall said.
Los Angeles defender A.J. DeLaGarza erased Colorado's best scoring chance of the first half. Sanna Nyassi got behind the Galaxy defense only to have DeLaGarza race back and knock away the ball before Nyassi got off a shot in the 41st minute.
Juninho increased the lead to 2-0. He intercepted a clearing pass and sent a low drive past Pickens from 25 yards.
"Birchall took a good ball in there, one that was difficult for Moor and Juninho's strike was a special one," Arena said. "So, having a two-goal cushion going into the second half was critical."
The Rapids made it 2-1 when Omar Cummings hit the left post. The ball bounded right to Casey, who scored easily in the 65th minute.
Caleb Folan of the Rapids received a red card ejection late in the second half for a hit on Juninho.
Barnett missed the net from close range in the 79th minute. Barnett didn't miss on a cross from Todd Dunivant in the 80th minute.
"When you know that Beckham is not playing and Donovan is not playing and Ricketts is not playing, of course the initial thought is this is a great thought to get back-to-back wins," Smith said. "Events didn't unfold whether it be decisions or opportunities that we had."