The Rangers were trailing 1-0 with 2:10 left in the third period when they got the puck on a turnover deep in the Panthers zone.
Derek Stepan sent a pass to the right circle, where Girardi sent a score-tying shot past the glove of Tim Thomas.
After Thomas made several sparkling stops in the scoreless overtime, Richards beat him in the third round of the shootout with a shot to the inside post.
Henrik Lundqvist turned aside three Panthers shooters in the tiebreaker and made 21 stops in regulation as New York won a fourth in five games.
Brad Boyes scored and Thomas finished with 29 saves for Florida, which dropped a fourth in five contests.