The Bees, with former United defender Pontus Jansson at the heart of their defence, frustrated the home side and were closing in on a point.
But Bielsa introduced Costa and Nketiah in the 65th and 77th minutes respectively, with the pair combining to devastating effect to take the Whites back to the top of the Championship.
Costa produced a fine run down the right and laid a tap-in on a plate for the on-loan Arsenal striker, who converted just four minutes into his home debut.
But rather than accept the plaudits for his influence of the game, Bielsa felt luck played its part.
The former Argentina boss said: “I think we deserved to win the game, we dominated the game. We didn’t create a lot of goal chances, but enough chances to make a difference.
“It was a physical and demanding game and the best moment we took.
“It was lucky (the substitutions) because only sometimes these things can happen, because the skill of the coaches is not making the decision of the players who make the last pass or score the goal.”
Bielsa was forced to make a change in defence, bringing in Gjanni Alioski for injured left-back Barry Douglas.
However, the alteration did not unsettle Leeds, who have conceded only twice in five games in all competitions this season.
Bielsa said: “I think we defended well. I think the opponent did not have enough clear chances.”
Brentford boss Thomas Frank hailed summer signing Jansson’s display on his return to Elland Road, saying: “He showed throughout the game he is all that we need in our side.
“Everybody knows we are good going forward, always creating chances, but one of the weaker spots is defence. He is a top defender. He looked forward to coming here.”
Frank felt his side paid the price for not replicating their first-half display after the interval.
The Bees had joy going forward in the opening 45 minutes and almost took the lead, but Bryan Mbeumo’s 25-yard effort hit the post.
“We know Elland Road is always a difficult place to play, especially with Bielsa and the way they press, not only high intensity but the different way of doing it,” he said.
“First half I think we play a top away performance, pressing high and causing Leeds problems, having good opportunities. An even game.
“Second half, for whatever reason, they stepped up and we couldn’t keep the level of intensity. We lost the ball too easy and didn’t run at them as much as we did in the first half. Defensively, it was a top defensive performance, but for one moment.”