Nicolas Mezquida converted an 85th-minute penalty to condemn Zlatan Ibrahimovic's Galaxy to its fourth consecutive league match without victory.
It was a wild finish in Colorado, where all three goals were scored in the final 11 minutes at Dick's Sporting Goods Park on Wednesday.
The Rapids broke the deadlock via Cole Bassett, whose glancing header put the home side ahead in the 79th minute.
Colorado's lead was short lived, however, after Giancarlo Gonzalez's header restored parity three minutes later.
But the Rapids had the last say as Mezquida scored from the penalty spot following a foul on Andre Shinyashiki with five minutes remaining.
There was late drama when Galaxy's Cristian Pavon was shown a straight red card deep into second-half stoppage time after trying to win the ball near the corner flag, however, VAR and the referee reversed the decision to yellow.
The result left the Galaxy eighth in the Western Conference, a point adrift of the seventh and final play-off spot occupied by Dallas, while the Rapids are 10th and six points further back.
Real Salt Lake moved up to second in the west and level on points with third-placed Seattle Sounders thanks to a 1-0 victory over San Jose Earthquakes.
Eastern Conference leader New York City – three points clear atop the table – played out a 1-1 draw at home to Toronto as it extended its unbeaten run to six games.
Meanwhile, Houston Dynamo snapped a seven-game winless streak in the league by defeating Minnesota United 2-0.