The Nationals broke a 1-1 tie in the top the eighth when Philadelphia's Justin De Fratus loaded the bases with two out and Scott Hairston sent home Anthony Rendon with a go-ahead sacrifice fly.
But the Phillies responded in the next half-inning against Tyler Clippard (6-3) with a two-out rally.
Cesar Hernandez coaxed a walk and Rollins followed by belting a pitch off the top of the right-field wall for a score-tying double.
The next batter, Ruiz, then pulled a grounder through the hole into left for the decisive tally.
B.J. Rosenberg (2-0) earned the win and Jonathan Papelbon notched his 24th save despite allowing two hits in the ninth as the Phils took the opener of a three-game series.
Ryan Zimmerman homered for Washington in the loss.