The Stars snapped a three-game St. Louis winning streak after trailing by a goal entering the third period.
Jamie Benn produced a critical shorthanded goal to tie it 7:53 into the third and Ribeiro then put a wrist shot past Jaroslav Halak to win it.
Andy McDonald scored both St. Louis goals, one of them shorthanded in the first period.
Kari Lehtonen got the win with 25 saves. Halak stopped 19-of-22 shots. Dallas has won two in a row.
Pregnant Mila Kunis wins 'Best Villain' at MTV Movie Awards
'Happy' fan videos make Pharrell cry [VIDEO]