Caley right-back David Raven was shown a straight red card by referee Craig Thomson in the 11th minute for a 'last man' challenge on Perth forward Rowan Vine but the home side struggled to make the most of the advantage during a mostly turgid game.
Saints did hit the post and the bar in the first-half but did not get the breakthrough until the 77th minute when MacLean headed in after good work on the left by substitute Nigel Hasselbaink, on 20 minutes earlier for Gregory Tade.
Steve Lomas's side moved on to 50 points, one behind third-placed Caley and one ahead of Ross County with three games remaining as they also made it 10 home games unbeaten although that fine form was not reflected in the attendance.
Ryan Conroy's deflected 30-yard free-kick found the net with 10 minutes left of a nervy performance, which left the hosts eight points adrift with three games left.
But with St Mirren securing a 3-3 draw with Hibernian, Dundee need to win all of their remaining games and hope St Mirren lose all of theirs as the Paisley side are 24 goals better off than John Brown's men.
Hibernian's Leigh Griffiths, who heads back to parent club Wolves in the summer, ensures he leaves with the curses of Saints fans ringing in his ears following his equaliser four minutes from time.
Niall McGinn's 20th goal of the season provided a superb start to new Aberdeen manager Derek McInnes' Pittodrie debut, and set the Dons on the road to a 1-0 victory that moves them above visitors Kilmarnock to head the SPL's bottom six.
Both sides were still feeling their way into the game when McGinn struck after just four minutes.
Stephen Hughes angled a ball to McGinn wide on the left, and the former Celtic man slipped the ball through the legs of Ross Barbour before curling a fabulous strike high beyond Rangers-bound goalkeeper Cammy Bell.