Gillingham face an uphill task to make it to Wembley in the Johnstone’s Paint Trophy after a heavy area final first-leg defeat.
League 1 leaders Bristol City completed their third victory at Priestfield in three months and visiting striker Matt Smith helped himself to four goals.
Cody McDonald scored for the Gills after just six minutes but a double from Smith put City infront at the break.
Smith - on loan from Fulham - scored twice more in the second half either side of McDonald’s second.
Gills’ caretaker management team named just one change to their starting XI for the JPT match, as Gavin Hoyte replaced injured Aaron Morris at right-back.
The Gills stuck with an attacking 4-4-2 formation and after surviving a couple of early scares, they took the lead.
Michael Doughty played in McDonald and the Gills striker got just enough power on the shot to beat keeper Frank Fielding. It was his fourth goal in five games and 10 of the season.
Bradley Dack was handed a great chance to double the lead, when McDonald played him in, but the shot was blasted straight at Fielding.
City levelled things up on 18 minutes when Emmanuel-Thomas skipped past Gills’ defence before standing the ball up. Smith – who netted twice in the recent league meeting at Priestfield – glanced the ball past Stuart Nelson.
Nine minutes later and he made it 2-1. Gills lost possession in the middle of the field, Emmanuel-Thomas ran at the defence and Smith just managed to stretch to the ball, nodding it past Nelson.
City bossed the rest of the half and Greg Cunningham crashed an effort off the underside of the bar.
Gillingham had still shown signs that they could get back into the game during the first half, although City’s front two of Emmanuel-Thomas and Smith were a real handful.
Emmanuel-Thomas dragged an early shot wide in the second half but it didn’t take long for City to make it 3-1. Scott Wagstaff got the better of the Gills defence, laid the ball off to Matt Smith, and his backheel crept into the net with 50 minutes gone.
Only a great save from Nelson denied Smith a fourth moments later as he beat John Egan to a header. The Gills keeper also blocked a powerful Emmanuel-Thomas effort just after the hour mark. Aden Flint headed the resulting corner over.
The Gills pulled a goal back after 70 minutes when a long ball found McDonald, he squeezed past two defenders, before burying it into the top corner.
That goal was the start of a resurgent spell for the Gills. Doug Loft had one shot blocked and one saved, while Luke Norris’ header was deflected wide.
Just as the Gills thought they were getting back into the tie Matt Smith, from 25 yards out, blasted home a stunning volley to restore a two-goal advantage for City. It was his sixth goal against the Gills in two games.
Gillingham: Nelson, Hoyte, Martin, Egan, Legge, Loft, Hessenthaler, Doughty (McGlashan 65mins), Dack, Dickenson (Norris 59mins), McDonald. Subs not used: Ehmer, G Morris, Galbraith.
Bristol City: Fielding, Wagstaff (Little 78mins), Cunningham (Bryan 87mins), Ayling, Flint, Williams, Pack, K Smith, Freeman, M Smith, Emmanuel-Thomas (Elliott 81mins). Subs not used: Richards, Osborne.
Attendance: 2,368 (239 away)