Greinke (1-0) allowed only three hits, tossing 61 of his 91 pitches for strikes as the Brewers rebounded from Friday's opening day loss to St. Louis.
The Brewers right-hander didn't issue a walk and struck out seven in the dominating performance.
Hart connected for a solo blast in the first inning and went deep again in the sixth with a two-run shot.
Rickie Weeks went 2-for-4 with a solo homer in Milwaukee's win.
Adam Wainwright (0-1) absorbed the loss, surrendering three runs on four hits in a 5 2/3-inning effort for the Cardinals, who fell to 2-1 on the young season.
Boston schools pull out free condoms over wrapping complaints
Aaron Carter is still in love with Hilary Duff