Barnsley produced a fantastic performance and could have been ahead by the time Nketiah converted Kalvin Phillips’s 84th-minute free-kick – in what was his fourth goal for Leeds.
Mallik Wilks was a domineering presence at the head of the Barnsley attack and will have been disappointed not to have found the net against his former employers.
The Reds’ hopes of salvaging anything from the game were dashed two minutes from time when Nketiah was adjudged to have been fouled in the area by Aapo Halme.
Mateusz Klich was given the responsibilty of taking the spot-kick and he made no mistake, calmly stroking the ball to the goalkeeper’s right.
Prior to the defeat, Barnsley hadn’t lost back-to-back home games against United in their entire history and the loss extended their winless run in all competitions to seven games.
Barnsley manager Daniel Stendel was disappointed not to take anything from the game and felt his side deserved at least a point.
“I am proud of the performance, when you create so many chances against Leeds, you need to take them in the right moment,” he said.
“In the second half, we had two to three big chances to go in front. But I think you can see why Leeds have ambitions of promotion this year.
“We are all disappointed but this is the way we need to play every week.”
Both sides looked to get on the front foot, with the home side constantly applying pressure on the Leeds men in possession.
The Whites got forward with intent however, at times, they over-committed players high up the pitch, allowing Barnsley to hit them on the break.
Leeds had the better chances and manager Marcelo Bielsa felt his side deserved the three points.
“It was a match that we deserved to win but one we could have lost or drew as well,” he said.
“The Championship is so special for me, that one team like this one is near the bottom of the table.”
Bielsa hailed Leeds’s persistence as despite a hatful of missed chances, they continued to push for a winner late into the game.
“We insist a lot, we keep going with the same intensity and also sometimes we are lucky to score or receive a goal,” he added.
“For me the most important thing was it was a beautiful match. I felt that everyone who watched the match, enjoyed it.
“The win, more than happiness, brings calm to me.”
Patrick Bamford missed a handful of chances in the contest before being replaced by Nketiah in the 70th minute.
At the other end, Wilks forced Kiko Casilla into a strong save early in the first half before narrowly shooting wide after turning Ben White.
He struck the side netting in the second period after pouncing on a mistake from White.
Another blank return in front of goal for the Tykes means they have now scored just four goals in seven Championship games this term.
“Four goals in seven games is not enough,” admitted Reds boss Stendel.
“With the attitude and mentality from today; when we can score the first goal in more games – we have only done it against Fulham – then we have a big chance to win.”
He added: “In the last games we have not scored or we go 1-0 down and that is difficult for our young team to change against an experienced team. We work hard and I am sure that we can change this.”
Helder Costa was a half-time substitute for United, replacing Jack Harrison, who struck the post late in the first half.
“Helder always chooses to cross,” explained Bielsa when giving the reason for the half-time change.
“He chooses the cross looking for a team-mate, in the first half we had a lot of opportunity to cross but didn’t find a team-mate in the box.
“Harrison and [Patrick] Bamford they played well enough. Helder and [Eddie] Nketiah have different characteristics and in a match like that, sometimes variety is a good option.”
The win moves Leeds back to the top of the table on points difference after Swansea were beaten 1-0 by Nottingham Forest on Saturday.
Barnsley, meanwhile, drop into the relegation places after picking up just five points from their opening seven games.
After both teams had squandered a number of chances, there was a feeling that a goal wasn’t going to come.
The lack of goals wasn’t due to a paucity of chances, with the Yorkshire rivals sharing a total of 38 shots.
It is only the third time that Leeds have won six consecutive away matches while Barnsley have been victorious in just four of their last 25 Yorkshire derbies.