The visitors took the lead with half an hour played when Deon Burton headed home Matt Fish's cross from the right. On a wet surface goalkeeper Chris Lewington was unable to get across in time to deny Burton his first for the club.
However the lead would last just four minutes when referee Rob Lewis awarded a penalty after Dwight Gayle was fouled by Stuart Nelson inside the box.
The keeper was booked for his troubles before the striker dusted himself off to smash the spot kick home and put the hosts on level terms.
Gillingham were back in front just after the hour when Myles Weston latched on to a long clearance from Fish. He took on two players before his left-footed effort went through the legs of Lewington.
Abu Ogogo came closest to getting an equalizer for Daggers, but Nelson was on hand to thwart him twice.