The game started with a chance for the travelling Bees after just five minutes. Ali Coote got in behind the back four, only to see the ball slow under his feet and that allowed goalkeeper Gary Rogers time to come out and dive on it.
The Bees looked comfortable on the ball in the cold clear air at Oriel Park. The ball was being played around from back to front and it limited the hosts' time in attack.
Clayton gave Brentford the lead after 24 minutes. Chasing down defender Stephen Folan, he won the ball back and raced through for a one-on-one. Keeping his calm, he tucked the ball under the onrushing keeper into the net.
A few minutes later he almost was at fault for an equaliser. Running the ball out of the box, the midfielder was dispossessed by Karolis Chvedukas. The Dundalk man turned and shot from the edge of the area, it bounced right in front of Thompson but the keeper managed to cling to the ball.
After 37 minutes, David Titov conceded a free-kick on the left side of Brentford's box. Ronan Murray stepped up to take it, shooting over the wall at Thompson's net. It swerved dangerously in the air but Thompson watched it carefully and managed to hang on to the ball.
At the break, it was 1-0 and Brentford looked good value for their lead. They had dominated possession and created more chances.
The second half started with Clayton firing a shot wide from the edge of the box. The ball moved in the air and Rogers looked relieved to see it miss his far post.
It wasn't long before the home side got back in the game. A long run down the left from Jamie McGrath allowed space to open up in the middle. A chipped ball through from the left-winger found debutant Kristjan Adorjan in the box, he turned quickly and shot low into the bottom corner.
Just before the hour mark, Dundalk could have done better from the edge of the penalty area. A neat one-two set Sean Gannon in to shoot but his effort was wild and rocketed over the crossbar.
With 63 minutes gone, Ali Coote was replaced by Jaakko Oksanen for the Finnish midfielder's debut in Brentford colours. Within minutes he played a pass low for Clayton on the left wing, who then flicked it on to Marcus Forss. The striker just missed out on a clear route to goal as Hoare cut across him.
The hosts could have been a goal ahead after 69 minutes. A low corner by sub Michael Duffy was missed by Dane Massey at the near post and then it fell to Hoare at the far. The defender failed to connect with his shot and it spun away from danger. Brentford escaped what looked like a certain goal.
Dundalk found the break through with just five minutes to go. A corner by Duffy again went to the far post, was headed back across by Massey and then finished by Folan. It was a well worked move that had Brentford chasing shadows in their own penalty area.
Brentford B: Thompson; Titov, Edobor, Sørensen, Talbro; Westbrooke, Cole (sub Assibey-Mensah 77 mins), Clayton; Coote (sub Oksanen 63 mins), Archibald, Forss (sub Hardy 77 mins)
Subs (not used): Houghton (GK), Appleton