Kompany rues Bayern Munich's missed chances in defeat to Villa
"If you don't take your chances, it can happen," he said of Jhon Duran's 79th-minute winner against the run of play.
Prior to that, the Germans had dominated possession and missed various chances at Villa Park in the English Midlands.
"We had big chances, we didn't score them. We gave away a moment and in that moment obviously Aston Villa scored a goal.
"I understand the occasion it was for the opponent and it was a special night for them," added Kompany graciously.
Villa, playing at home in Europe's elite competition for the first time in 41 years, were grateful to goalkeeper Emiliano Martinez for a superb display, including a last-gasp save from a goal-bound Harry Kane header.
Kane had scored four times in Bayern's 9-2 demolition of Dinamo Zagreb in their first game of the new Champions League 36-team league format.
"When we have the ball, we're dangerous, but they (Villa) are a strong team, this isn't an easy place. It wasn't a bad performance," Kompany added.
"We conceded very few chances... If we focus on our own work, we will win a lot of games still."