Koeman is yet to beat Madrid in three games since taking over as Barca coach last year. This latest loss comes after recent Champions League group stage defeats to Bayern Munich and Benfica, as well as a league loss to Atletico Madrid.
- ESPN+ viewers' guide: LaLiga, Bundesliga, MLS, FA Cup, more
- Don't have ESPN? Get instant access
However, the Dutch coach, who was handed a stay of execution before the international break by president Joan Laporta, insists his team is getting closer to the top teams.
"Of course we have to demand that we win these games," Koeman said in a postgame news conference having claimed earlier this season that Barca cannot be expected to compete at the top level.
"In the game today we have shown that we're not inferior to Madrid. But instead of going 1-0 up, we go 1-0 down and that has a massive effect on the match. But we have shown that, little by little, we're improving and we're closer to winning big games."
Some supporters didn't share Koeman's sentiment after the game as a group of them surrounded and impeded his car as he drove out of Camp Nou, yelling for him to step down. The club condemned the fans' "violent actions" in statement, saying: "FC Barcelona publicly condemns the violent and disdainful acts that our manager experienced when leaving the Camp Nou.
"The Club will take security and disciplinary measures so that such unfortunate events do not happen again."
Koeman felt Barca started brightly but the game swung when Sergino Dest missed a gilt-edged chance in the 25th minute, with Alaba opening the scoring at the other end a few minutes later.
"We were good in the first half," Koeman added. "We controlled the game well and we had a big chance to take the lead, but once they score the first they can play their game in the second half.
"They played to their strengths, waiting and defending. And we did not have any big chances to level. You need to attack and take risks, but you know Madrid's strength in counterattacking play."
The win temporarily takes Madrid top of the table on 20 points, five clear of Barca in eighth. Madrid coach Carlo Ancelotti said his side played a disciplined game.
"A practical game, an intelligent game. Defensively very good, with the ball we could have played out better in the first half but we were very efficient on the counter," Ancelotti added. "This team has quality of course and we have to enjoy it. I'm happy, they're three points, it was a difficult game. Barca made the game complicated for us, it wasn't simple."
Ancelotti, in his second stint as Madrid manager, said the win was special considering the rivalry but tempered expectations.
"El Clasico is the most important game and we won here, we're happy but unfortunately they're only three points. I don't like to get into other teams. Barca played a good game, they can't be reproached," the Italian gaffer added.
But Koeman said losing a Clasico is about more than three points.
"A Clasico is more than three points, I understand that perfectly," Koeman said. "But we have no time to get down, we have another game on Wednesday [in LaLiga at Rayo Vallecano].
"The season is long and a lot can happen. We have to keep going and winning games to cut the gap. We're sad today, but tomorrow we start preparing for the next match."
It was the first Clasico played with fans since the pandemic, with almost 90,000 supporters filing into Camp Nou. Koeman thanked them for their support but criticised them for whistling striker Luuk de Jong when he was brought on late on.
"I don't like it when fans whistle our own player," he said. "It's not good and it doesn't help the team. Luuk's a player that gives us other things.
"It's normal when you're losing a game with 10 or 15 minutes left to turn to someone who's good in the air. We have to help and support him because he's a team player."
ESPN Madrid correspondent Alex Kirkland contributed to this report.