Hardy scored three times while Nate McLouth added a two-run homer and Nick Markakis provided a solo blast for the Orioles, who took 2-of-3 contests in the series and pulled within two games of the A's for an American League wild card spot.
Scott Feldman (4-3) went five innings to get the win, allowing one run on three hits. He overcame four walks and struck out six.
A's starter Sonny Gray (1-2) was lit up for six runs on eight hits in a 3 1/3 inning effort.
Josh Donaldson clouted a two-run homer for Oakland.