Alex Ovechkin and Joey Crabb also scored for the Capitals, who had lost three in a row and entered the night 10 points behind the Hurricanes in the Southeast Division.
Michael Neuvirth made 36 saves to help Washington come back from an early two-goal deficit.
Alexander Semin and Patrick Dwyer scored for the Hurricanes, who had won six of seven and outscored opponents 29-15 during that stretch. Dan Ellis made 22 saves for Carolina.
Ribeiro's goal was scored after Ovechkin was stopped on a breakaway. The puck stayed in the crease, and Ribeiro managed to nudge it across the line. The goal was confirmed by a video review.
Stay Connected
NHL.TV™
NHL GameCenter LIVE™ is now NHL.TV™.
Watch out-of-market games and replays with an all new redesigned media player, mobile and connected device apps.
Introducing the new official NHL App, available for iPhone, iPad and Android smartphones and tablets. A host of new features and improved functionality are available across all platforms, including a redesigned league-wide scoreboard, expanded news coverage, searchable video highlights, individual team experiences* and more. The new NHL App on your tablet also introduces new offerings such as 60fps video, Multitasking** and Picture-in-Picture.
*Available only for smartphones
** Available only for suported iPads