The visitors had their captain, Scott Fitzgerald, sent off in injury time, for a second bookable offence, after Gerard Lavin had preceded him into the showers in the 62nd minute. While Gillingham extended their unbeaten run to 16 League games, they missed out on the opportunity to regain fifth place.
Even playing against a strong wind, the home side played with more gusto in the first period, befitting their reputation as serious promotion candidates, and deserved their 13th-minute lead. Mick Galloway exchanged a one-two on the edge of the penalty area with Rob Taylor and from 20 yards saw his shot balloon up off Steven Reid and into the top corner over the debutant goalkeeper Phil Smith.
Smith, coming in as a late replacement for Nigel Spink, whose wife had been taken ill, saved well from Taylor as the striker, playing despite a hernia injury that will require surgery, bustled his way through the middle.
It seemed only a matter of time before Gillingham would pull further ahead, Jamie Stuart producing an exemplary tackle to deny Carl Asaba.
Millwall have been in fair form themselves of late and almost equalised nine minutes before the break. Tim Cahill and the highly rated Paul Shaw combined to feed Neil Harris on the edge of the area and his curling shot rebounded off the far post.
There was plenty of derby rivalry and four bookings in an energetic first period was a fair reflection of some meaty challenges.
Cahill could have levelled when Millwall finally managed an effort on target, the midfielder diving to head Lavin's centre straight at Vince Bartram. But just after the hour the visitors' task was made all the steeper when Lavin was shown the red card for an off-the-ball difference of opinion with Asaba.
Gillingham were left hanging on as Millwall's 19-year-old keeper produced an outstanding save to tip over Taylor's rasping volley after 74 minutes.
That stop seemed all the more important as Millwall achieved parity eight minutes from time, when substitute Richard Sadlier turned Adrian Pennock on the left edge of the penalty area and picked out Neill arriving late who drove home from 10 yards out.
Gillingham (3-4-1-2): Bartram; Bryant, Pennock, Ashby; Southall, Paul Smith, Galloway (Saunders, 88), Patterson; Hessenthaler (Hodge, 74); Taylor, Asaba.
Millwall (4-4-2): Phil Smith; Lavin, Stuart, Fitzgerald, Ryan; Reid (Sadlier, 79), Cahill, Bowry, Neill; Harris (Nethercott, 90), Shaw.
Referee: S Bennett (Orpington).