It gave their supporters some joy at the end of a rain-soaked day at Dens Park as they collected all three points with a 2-1 victory.
Beattie also had a hand in the opening goal when he headed the ball down for Peter MacDonald to give Dundee a 78th-minute lead.
It came shortly after Declan Gallagher had inadvertently deflected a cross against his own crossbar, a scare which produced the desired response.
But Queen of the South were swift to answer MacDonald's opening goal as Derek Lyle equalised within two minutes before Beattie struck the decisive blow with just a minute remaining.
The win moves Dundee to within a point of Hamilton Academical, who lost their 100% home record when they were held 1-1 by a Raith Rovers side who had to play for most of the match with 10 men.
Dougie Hill was sent off on 34 minutes after picking up his second booking for a challenge on James Keatings. It came just three minutes after Keatings had put Hamilton in front with a calm finish, making up for an earlier miss when he somehow headed wide in front of goal.
Raith stepped up their work rate in the second half and made life difficult for the home side. Their reward came 20 minutes from time when Calum Elliot scored from the penalty spot after substitute Gordon Smith had been fouled by Grant Gillespie.
At the foot of the table, Cowdenbeath thumped Morton 5-1 at Central Park with Kane Hemmings grabbing a hat-trick to take his season's tally to 10 goals.
Morton were up against it after losing two goals in the opening four minutes - Hemmings adding to a Jordan Morton opener. Hemmings struck again before half-time, though Dougie Imrie reduced the deficit to give Morton false hope.
Greig Stewart rattled in the fourth goal in 72 minutes before Hemmings completed his hat-trick. The result leaves Morton adrift at the bottom.
Dumbarton enjoyed a 2-1 win at Falkirk. Garry Fleming found the net after only seven minutes and Mitch Megginson doubled Dumbarton's advantage when he drove home from Paul McGinn's cross midway through the first half. Falkirk pulled a goal back with a stunning 35-yard strike from Phil Roberts seven minutes from the interval.
Blair Alston struck the crossbar during the second half, but Dumbarton held on. Roberts was sent off in injury time for a second yellow card.
Andy Barrowman scored a late winner as Livingston edged Alloa Athletic 3-2 at the Energy Assets Arena. Stefan Scougall put them ahead with a 20-yard shot, but Kevin Cawley equalised for Paul Hartley's visitors.
Scougall set up Livingston's second, floating a cross to the back post for Coll Donaldson to head home for his first goal as a professional.
Ben Gordon equalised, but just as it looked as if Alloa had earned a point, Barrowman had the final say.