Brazilian Raphinha fired Leeds ahead in the 26th minute of a breathless opening half with a vicious low free kick that beat a diving Kasper Schmeichel and crept into the bottom left corner before Leicester hit back in style two minutes later.
- Don't have ESPN? Get instant access
Barnes darted into the penalty area and unleashed a curling right-footed effort from a tight angle that gave Leeds keeper Illan Meslier no chance and silenced the raucous home crowd.
"We created double the amount of danger than them," Leeds boss Marcelo Bielsa told the BBC. "We dominated a large part of the game. We defended well and we attacked well. And even if we deserved to win, we didn't manage to obtain it."
The result leaves Leicester 12th on 15 points from 11 games, with Leeds up to 15th on 11 points.
Leeds spurned a great chance to go ahead shortly after the break as an unmarked Jack Harrison failed to keep his shot from going over the crossbar from point-blank range following a flick on from fellow midfielder Kalvin Phillips.
Leicester's Ademola Lookman tapped in from close range in the 67th minute but his effort was disallowed after the intervention of the Video Assistant Referee as the forward was deemed to be offside when Jamie Vardy headed the ball to him.
"We managed a good performance against a good opponent," Bielsa added. "Football has those moments. There were two identical plays. They had one goal ruled out the same way but we couldn't finish our chance (through Harrison).
"Offensively we duplicated the opponents in chances. We took the ball off them a lot and we had good possession. We have to defend for every ball whether we've just scored a goal or not. We should have neutralised the game in that moment."
Leicester manager Brendan Rodgers believes their fans would be proud of his team's effort.
"We showed a great mentality, going behind and Harvey scored a brilliant goal. We were unfortunate with the goal disallowed. We had a good few moments in the right areas," he said.