A rather scrappy game came to life just after the hour mark when Dons goalkeeper Ross Worner gifted the visitors the crucial opening goal.
Matt Done's looped cross lured Worner off his line but the ball stuck in the wind and Hogan reacted quickest to nudge the ball over the line after 66 minutes.
The forward added a second goal in the 79th minute, rounding Worner and sliding the ball into the empty goal after latching on to Peter Vicenti's defence-splitting pass.
And three minutes later Hogan completed his treble by lifting the ball over Worner to seal a rare victory for Dale against another top-half side.
The Dons spurned their best chance early in the second-half. Charlie Wyke rounded the goalkeeper after Ashley Eastham gifted him possession but he ran into team-mate Danny Hylton with the goal gaping.