Wrexham reached a new club record of 17 matches undefeated and Brentford had their fourth loss in a row.
Wally Downes was extremely disappointed after his side felt they had done enough to win.
He said "We were unfortunate not to get anything out of it. We came to stifle them and we did the job very well." He was also disappointed when his set-pieces came to nothing while Brentford were on top in the second half.
He said "Last season set-pieces were our strong point. This season it was the opposite and we have to work on it." Dennis Lawrence was Wrexham's hero with one goal. It came while the home side were down to ten men, with Brian Carey off the pitch to have stitches in a head wound.
Lawrence went up for a corner and Darren Ferguson used all of his six foot six inches as he rose above the defence and powered his header to the right of Paul Smith.
Carey came back for the next set-piece and forced a header against the crossbar.
Wrexham had problems when Ed Hutchinson tightened his marking on Darren Ferguson and was seriously reducing the midfielder's influence on the game.
Home manager Denis Smith said: "I'm pleased with another win. We had to battle to get through because they came to frustrate us. We are creating chances but we have got to put more of them away." He praised his back four and goalkeeper for standing up to late pressure as the home side held on for the final whistle.
Steve Hughes created an early opening for Brentford but Kevin O'Connor couldn't reach it in the box and when Tony Rougier picked up a loose ball from Ferguson he was denied by Shaun Pejic in front of goal.
Hutchinson put a long shot wide and Kevin O'Connor fired too high and Rougier made the best shot of the game for Brentford when he cut in from the left wing to be denied by Andy Dibble's one-handed save.
Hector Sam had two good openings for Wrexham, wasting one by shooting straight at the keeper and placing the other wide.