The home side went ahead when Jonathan Douglas steered the ball in from close range and doubled their lead through Marcello Trotta's second-half penalty.
Read how the action unfolded below.
7.15pmGood evening and welcome to our live text coverage of Brentford vs. Gillingham. Kickoff is at 7.45pm, but we've got plenty of news and stats to keep you entertained until then.
7.16pmLooking at the league table and recent form, you would have to say that the home side are favourites. The Bees are second and are pushing hard for promotion to the Championship. Opponents Gillingham are moving away from the bottom of the table, but they're not safe yet.
7.18pmBefore I ramble on even more, let's take a look at the teams, starting with Brentford.
7.21pmBRENTFORD: Button; Logan, Bidwell, Craig, O'Connor; Douglas, Judge, McCormack, Saville; Donaldson, Trotta
7.23pmSUBS: Lee, Grigg, Dallas, Diagouraga, Reeves, Akpom, Adams
7.25pmGILLINGHAM: Nelson; Hewitt, Martin, Barrett, Legge; Linganzi, Weston, Harriman, Gregory; Fagan, McDonald
7.26pmSUBS: Davies, Akinfenwa, Dack, Smith, Howard, Marriott, Hessenthaler
7.28pmSo, Adam Forshaw, Harlee Dean and Sam Saunders miss out for the home side, but club captain Kevin O'Connor is in at centre back. New loan signing Alan Judge also starts.
7.29pmMichael Harriman continues in midfield for the Gills, and Fagan and McDonald start together in attack.
7.32pmAs I mentioned earlier, Mark Warburton's side are currently in a great position and could erase the memories of last season with promotion this term. They are unbeaten in their last 15 league matches – of which 13 have been wins – but were held to a 1-1 draw at Walsall last week.
7.33pmWith League One leaders Leyton Orient not playing until Tuesday, the Bees could go top tonight for the next few days at least.
7.36pmHowever, the Gills won't make it easy. Peter Taylor's side are improving and now sit in 14th. However, speaking before the match, the manager told BBC Sport: "We are seven points away from the danger area and that is good progress. I am still looking over my shoulder as I can't see Sheffield United and Bristol City staying there."
7.38pmTaylor also praised Brentford, but urged his players not to "fear them". "They are a confident team in a great position, but we are certainly not going to fear them," he added.
7.40pmGriffin Park is filling up nicely as we approach kickoff. A few moments ago the away players were doing shooting practice in front of the visiting supporters.
7.40pmREF WATCH: Our referee for this match is Keith Stroud.
7.43pmPREDICTION: Right, it's time for a prediction. Studying Brentford's recent form and the way they have been playing, I can't see anything other than a home win, but I think it will be close, so I'm saying 2-1.
7.44pmThe players are now making their way from the tunnel to the pitch, in the pouring rain.
7.45pmIt really is awful weather at Griffin Park. I wonder if that will play a part in the outcome?
1 minKICKOFF! We're underway in the rain!
1 minDecent start by the away side, who see an early shot blocked. The ball is currently back with the home goalkeeper.
2 minThe pitch is greasy and I think we could see a few players sliding around as the match progresses.
4 minNot much to report on in terms of chances, we're yet to see either side put together a number of passes.
5 minGillingham have started brightly, however. They are closing down at every opportunity and Brentford have struggled to get on the ball. As I say that, Alan Judge picks it up and the home side are on the move.
7 minThat move fails to produce, but moments later McCormack tries to find Donaldson in the box, but his cross is poor and the away side clear.
9 minBLOCK! The Bees are starting to find their rhythm, but Gillingham's Legge does well to play in Weston on the right wing, who sees his effort blocked.
11 minA few high long balls run out of play and it's with David Button. That was a bit wasteful from the Gills.
13 minSAVE! Donaldson makes room in the box but sees his shot blocked. However, the ball is worked back in and Judge picks it up, before being thwarted by Nelson from a few yards out. Good stop.
16 minTony Craig is currently off the pitch receiving treatment, so the home side are down to 10 at the moment.
17 minCHANCE! Donaldson has started well, and again he shows his strength and skill to slip the ball through to Trotta. However, his touch is poor and the ball runs out for a goal kick.
18 minSAVE! A long throw isn't cleared and the ball comes out to Gregory on the edge of the box. His effort is well struck, but is straight at Button, who makes a simple save.
20 minSAVE! This is some save by Nelson! The home side show their class with some quick, decisive passing, before the ball comes out to Judge. He hits it first time, but Nelson gets across to tip away his curling effort.
22 minGOAL! BRENTFORD 1-0 GILLINGHAM (Jonathan Douglas)
22 minThe home side have the lead, but it's poor defending. Bidwell goes down the left and delivers a decent cross to the middle. Douglas is in the right place at the right time and taps it in from close range.
24 minIt has been a positive response by the Gills, and Barrett sees his header easily saved by Button. There's no doubt that they are playing well enough to force an equaliser.
28 minStrangely, the home side look nervous in possession now. They have a free kick, however, on the far right.
29 minWarburton's men win a corner, which is eventually cleared and now the away side have the ball in midfield. Fair play to Gillingham, they have not let that opening goal stop them from playing their own game.
32 minWIDE! Judge gets the ball to Logan, who takes a touch before dragging his shot wide of Nelson's post.
33 minMISS! Oh dear. It should be 1-1, but it isn't. Fagan flicks the ball through to McDonald, who is one-on-one with Button. He just has to clip the ball over the goalkeeper, but instead decides to side foot it, and his shot goes wide. Great chance!
34 minYELLOW CARD! Just before that, Steven Gregory was shown a yellow card.
36 minSHOT! Douglas hammers the ball at goal and it smacks Barrett in the face. The home fans want a penalty, but that was definitely his face, not handball!
40 minJust over five minutes to go before half time and the game has quietened down a little. Gillingham have shown plenty of promise, but are lacking quality in the final third.
41 minYELLOW CARD! Saville is booked for a tackle on Linganzi and the Gills have a free kick in a decent position. However, it's cleared for a corner.
43 minThat's also cleared, but Brentford give it away and Nelson launches a high ball into the air.
44 minGood work down the left sees Jake Bidwell get another cross in, but it's cleared for a corner. Bidwell takes it, and O'Connor heads wide from just a few yards out.
45 minWhat terrific defending by Barrett! The Gillingham defender throws himself in front of two shots to keep the score at 1-0. Brilliant play!
45+3 minHALF TIME:BRENTFORD 1-0 GILLINGHAM
8.37pmAs it stands Brentford are going top of League One thanks to Jonathan Douglas's goal. It could have been more, but Cody McDonald missed a glorious to equalise for Gillingham.
8.40pmSTATS: In that first half the Bees had nine shots, three of which were on target. Their opponents had five shots, with four on target. Apparently, the away side just edged possession. From where I'm sitting, Brentford seemed to have more of the ball.
8.42pmPeter Taylor will be pretty happy with how his team have performed so far. They have been competitive and created one great chance. However, they switched off and gave Douglas too much time and space.
8.45pmFor Brentford, Mark Warburton will be asking for more of the same in the second half. His players haven't been at their very best, but have done enough to warrant the lead.
8.50pmThe Gillingham players are back on the pitch and the second half is just seconds away.
45 minKICKOFF! Brentford get us going in the second half.
46 minPositive start by the home side, as Alan Judge makes a run down the left and wins a thrown. That is cleared, however.
47 minApparently Tony Craig has a suspected broken hand, but has decided to carry on.
49 minSAVE! Brentford's positive play continues as Marcello Trotta beats a defender on the edge of the box before hitting a tame shot at Nelson. Either side of the goalkeeper and that would have been in.
50 minFagan and McDonald link up well for Gillingham and Tony Craig's touch is heavy. The ball is loose and Button comes out to claim, but spills it. However, he makes up for his mistake and gets the ball out.
53 minMISS! Another chance for Trotta, but another miss. Saville plays him in on the left hand side of the box, but he drives a shot wide of the post.
54 minSAVE! Brentford are very much on top at the start of this second half, and Nelson prevents them from adding to their lead with a good save from Judge's curling effort from outside the box.
55 minWIDE! Third time lucky for Trotta? Well, no. Saville is again the architect, picking out his teammate in the box. Despite getting a clean strike, the shot is way off target.
58 minGILLINGHAM SUBS: A double change as Bradley Dack and Adebayo Akinfenwa come on for Myles Weston and Amine Linganzi.
62 minGillingham have come back into this match in the last few minutes. McDonald does well on the left wing before he cuts inside and feeds Gregory, but the move comes to nothing.
64 minGREAT SAVE! Stuart Nelson has been in brilliant form tonight, and he's just made another crucial save. Donaldson runs through in the box and shrugs off Martin, but Nelson sticks out a leg and diverts the ball away from danger.
68 minYELLOW CARD! Michael Harriman gets a booking for bringing down Donaldson.
69 minPENALTY TO BRENTFORD!
69 minGOAL! BRENTFORD 2-0 GILLINGHAM (Trotta)
69 minBarrett fouls Craig in the box and the referee points to the spot. Marcello Trotta steps up and easily beats Nelson to make it 2-0 to the home side.
71 minBRENTFORD SUB: That is Trotta's last contribution as Chuba Akpom comes on.
72 minGOAL! BRENTFORD 2-1 GILLINGHAM (McDonald)
72 minGame on now, but where on earth did that come from? Fagan does well to find McDonald in the box, who stays calm and beats Button in the Brentford goal. The goalkeeper gets a touch, but the ball has just enough pace to roll over the line.
76 minThe away side are pushing for the equaliser and Barrett scuffs a shot before McDonald mis-hits a shot which goes wide.
78 minWIDE! Akinfenwa puts a header wide after a deep cross from the right. He might have done better, but at least the Gills are creating chances.
80 minGILLINGHAM SUB: Jack Marriott makes his debut, replacing Steven Gregory.
83 minBidwell has been a constant threat for the home side and he again delivers a cross from the left. It's cleared, but he has been given far too much room all night.
86 minOVER! It's almost 3-1 to the Bees! Chuba Akpom shows good skill and finds Judge, but his powerful shot from the edge of the box is inches over the bar!
87 minGREAT CHANCE! What a great second half it's been at Griffin Park, and we should have had the fourth goal of the night, but after being played in by Akinfenwa, Marriott is unable to beat Button from about four yards out.
89 minAdam Barrett is down hurt following a collision with Donaldson, but I think he will be fine to carry on.
90 minWe've got four minutes of added time. Is there one last chance for Gillingham to snatch a draw?
90+1 minNelson collects a weak Alan Judge shot as the home side continue to attack. However, I think we're almost done here.
90+4 minSAVE! Another brilliant stop by Nelson as he pushes away Donaldson's fierce shot.
90+4 minFULL TIME: BRENTFORD 2-1 GILLINGHAM
9.43 pmThere's the full-time whistle and Brentford move to the top of League One, two points ahead of Leyton Orient. On another day, Gillingham might have come away with a draw, but overall the home side deserved to win.
9.45pmThat's all from me tonight, but stay with us for lots of news and reaction. Goodbye!