Managerless Gillingham were beaten by a stoppage-time goal at Port Vale on Saturday.
Ben Williamson’s first half effort for Port Vale was cancelled out by Cody McDonald’s strike.
An open attacking game looked to be ending without any further goals before home substitute Colin Daniel fired home in the third minute of time added on.
Caretaker boss Andy Hessenthaler made five changes to the starting XI as the Gills went in search of a third straight away win in League 1.
Bradley Dack and former Vale skipper Doug Loft returned to the team, as did defender Leon Legge, at the expense of QPR loanee Max Ehmer.
Aaron Morris and Brennan Dickenson also returned for the Gills, playing their first game since the New Year’s Eve dismissal of Peter Taylor.
While Hessenthaler watched the action from the stands Darren Hare and Steve Lovell – both part of the backroom staff at Gills – offered assistance from the touchline.
The first half was an open affair with chances aplenty for both teams.
Vale went ahead in the 12 minute when Williamson got the better of Gills right-back Aaron Morris and fired past visiting keeper Stuart Nelson.
Morris – who has missed a large part of the season with a hamstring injury – limped off after the goal, suffering a possible recurrence.
Brennan Dickenson had found himself in with a chance at goal on several occasions but it was his strike-partner McDonald who levelled.
With 31 minutes gone Bradley Dack intercepted a poor pass from Vale’s Richard Duffy before picking out McDonald, who guided the ball past keeper Chris Neal, for his ninth goal of the season.
Loft shot wide for the Gills towards the end of the half but Vale finished the first 45 minutes in the ascendancy. Dany N’Guessan had the ball in the net but it was ruled out for off-side.
Just seconds after the restart Louis Dodds fired narrowly wide for Vale.
The hosts turned up the pressure on the hour mark as they looked to make the most of their second half improvement.
Nelson saved well from winger Mark Marshall and from the resulting corner he held onto Dany N’Guessan’s header, which went straight at him.
The Gills survived, and Loft almost scored a spectacular goal from 25 yards, his rising shot clipping the top of the Vale bar.
McDonald got in on goal with 20 minutes left but the shot was saved by Neal.
Like the first half, chances were coming from both teams and Nelson did well to tip Dodds’ deflected shot over, before saving again from N’Guessan following the corner.
Dack’s late strike for Gills was pushed wide by the keeper while Vale’s Carl Dickson wasted a great chance in stoppage time.
With 93 minutes gone Vale hit a winner. Winger Mark Marshall drove at the Gills defence before laying the ball off to Daniel and he drilled a low shot home through a crowded area.
Port Vale: Neal, Yates, Dickinson, Duffy, Dodds, Williamson (Daniel 74mins), O'Connor, Brown (Lines 68mins), Marshall, Veseli, N'Guessan (Campion 90mins). Subs not used: Johnson, Robertson, Birchall, Lloyd.
Gillingham: Nelson, Martin, Egan, Legge, A Morris (Hoyte 14mins), Loft, Hessenthaler, Doughty (Pritchard 86mins), Dack, Dickenson (Kedwell 78mins), McDonald. Subs not used: Ehmer, McGlashan, G Morris, Norris.
Attendance: 4,783 (166 away)