The Dons sealed the points when Angelo Balanta broke on the left and found Baldock, who cut inside the penalty area and fired low past Jed Steer's right hand.
The visitors almost claimed a second nine minutes later when Steer made a great save from Balanta, diving to his right when the midfielder looked sure to score.
Yeovil began to fight back before half-time and when they pressed strongly for an equaliser Steve MacLean brought keeper David Martin to his knees.
It was much the same story in the second half with Yeovil attacking for long periods but the Dons defending well and looking dangerous on the break.
An indication of that pressure came three minutes into stoppage time when the Dons had Darren Potter sent off for time-wasting as the midfielder collected his second yellow card.