ORIENT fell to defeat in disappointing fashion in an action packed second half at Prestfield.
Gianvito Plasmati set Orient on their way with his first goal for the club from the spot before two almost identical goals from Leon Legge looked like they had condemned the O's to defeat.
However, the home side had to play the last 15 minutes with 10 men after Michael Doughty was sent off and Orient piled on the pressure until Chris Dagnall levelled the scores from a magnificent ball from Scott Cuthbert.
There would be a final twist in the tail though as Cody McDonald netted with the last kick of the game to send them above the O's.
Mauro Milanese was boosted by the return of Romain Vincelot from injury faster than first expected, whilst Andrea Dossena too received clearance to make his debut. Adam Legzdins was preferred in goal for the O's whilst Jay Simpson was also declared fit to play after struggling with a knock sustained against Northampton.
It was an attacking looking bench too with David Mooney back in the squad for the first time since September after recovering from an ankle injury.
The O's have experimented with their shape in recent weeks and seemed to flit between a 4-4-2 and 3-4-1-2 in the opening stages as they dominated the early possession. Dean Cox drifted in and out of the hole behind the front two as Orient looked comfortable.
Despite their bright start the O's almost fell behind in what would have been unjust fashion. Former O's loanee Adam Chicksen found space on the left and appeared to be tackled well by Scott Cuthbert, however referee Darren Deadman - who had a good view - had other ideas and pointed to the penalty spot. Danny Kedwell stepped up for the Gills but Legzdins went the right way and saved well as he clutched the ball to his chest.
Orient had to channel their sense of injustice and seemed to do so well as they kept their cool and carried on pushing and probing the Gills who were being pegged back in their own half.
Gillingham looked a threat on the break though and when a cross was cleared from Jermaine McGlashan, the home side were fastest to react as Michael Doughty cushioned a volley narrowly over the bar.
It sparked a spell of pressure from the home side as they took control in the middle of the park with Doug Loft and Michael Doughty passing the ball well. Milanese would have wanted to see more from his side after the first quarter of the game as Stuart Nelson in the Gills' goal remained a spectator.
As the 30 minute marked ticked closer, Orient showed glimpses of class going forwards as Gianvito Plasmati and Vincelot combined well to almost play the Frenchman in.
The Gills defence certainly did not looked the most solid which would have given the O's hope as they almost capitalised on a mistake by Leon Legge but Simpson's shot was deflected wide.
Simpson had not quite looked as bright as in recent games and looked to be struggling before making way for Mooney with five minutes of the half remaining.
Mooney was involved immediately and slipped in Cox who slid in with Nelson to almost turn the ball home.
In truth it was a half that wouldn't live long in the memory, though Orient would have been the happier to go in level after that early penalty save from Legzdins.
There were no changes at the interval and Orient got off to a flyer in the second half. Having been aggrieved at conceding a penalty in the early stages, the O's were delighted when they were given one of their own. Dean Cox led a counter attack and when Pritchard fed Wright inside the box he looked to shift the ball to get a shot away but tangled with John Egan and Deadman pointed straight to the spot. Big Plasmati stepped up and made no mistake from the spot to give the O's the lead.
The goal gave the game a much needed lift and Orient were a whisker away from doubling their lead five minutes later. Dossena had had a quiet debut but showed his class when he flashed a terrific cross across the six yard box that was millimetres away from Plasmati at the back post.
Orient's joy was short-lived though when the home side found a leveller out of the blue. The Gills pumped a deep free-kick into the penalty area and Leon Legge rose highest to loop a header over Legzdins and into the corner of the net.
Both managers made changes with 30 minutes to go and Cody McDonald for the home side was straight into the action as he spun Shane Lowry and flashed a shot narrowly wide of the target.
As the sun disappeared and the temperature dropped in Kent, the O's started to click into gear again with 25 minutes to go as they produced some neat one-touch football, particularly down the right hand side.
Milanese would have hoped his injury list would not grow any longer but Lowry was next to limp off with 20 minutes to go and was replaced by Mathieu Baudry.
A Cox corner soon after caused an almighty scramble that noone could turn home as the O's looked the more likely to snatch a winner.
It was not to be though as Orient conceded again in what was almost a carbon copy of the first goal. Again the ball was pumped in from a free-kick on the left and again Legge rose highest to head past Legzdins.
More drama would follow though as Michael Doughty received his marching orders with 15 minutes to go giving Orient a platform to hunt in search of an equaliser.
The Gills left one up front as Orient piled on the pressure, picking up second ball after second ball with Vincelot and Wright taking hold of the game.
The Orient attacks came in waves but at times their final ball just evaded them as time ticked away, Dagnall had a header brilliantly saved but made no mistake a second time when Cuthbert put in a magnificent cross from the right and the striker headed home.
Orient went in search of a winner but against all odds the Gills won it from another set piece as McDonald volleyed home from a corner with the last kick of the game.
ORIENT: Legzdins, Dossena, Clarke (C), Lowry (Baudry 69), Cuthbert, Cox, Vincelot, Wright, Pritchard, Plasmati (Dagnall 61), Simpson (Mooney 39)
Subs: Omozusi, Woods, Sawyer, Batt
Goals: Plasmati pen 48, Dagnall 90
Bookings: Pritchard 54,
Gills: Nelson, Egan, Legge, Loft (C), Hessenthaler, Kedwell (McDonald 62), McGlashan (Dack 62), Doughty, Dickenson, Chicksen, Hoyte
Subs: Fish, Morris, German, Linganzi, Norris
Goals: Legge 55, 74, McDonald 90
Bookings: Loft 81, McDonald 90
RED: Doughty 76 (2 yellows)