The Colombia winger, who impressed during his country's run to the 2026 FIFA World Cup last 16, was one of Bayern's standout performers as Vincent Kompany's side continued their preparations for the new Bundesliga season.
Bayern took the lead in the 37th minute when Kim Min-jae met a free-kick near the edge of the six-yard box and guided his header into the far corner.
Kompany introduced several senior players after the break, with Bayern increasing the pressure on Villa. Diaz went close to adding a second when his effort was cleared off the line.
The winger eventually got his goal in the 73rd minute in spectacular fashion. Diaz collected the ball on the left, cut inside and unleashed a dipping effort that flew in off the crossbar.
Villa reduced the deficit seven minutes from time when new signing Joao Gomes fired a powerful shot from the edge of the penalty area, giving Manuel Neuer no chance.
The Premier League side almost levelled moments later, but Neuer reacted sharply to keep out Tammy Abraham's close-range header and preserve Bayern's victory.
Bayern were without several of their FIFA World Cup stars in Hong Kong, including Michael Olise and Harry Kane.
Kompany was pleased with the performance despite having a much-changed squad.
"I told the players honestly that I was impressed because you know who's there and you know who's not there," the Bayern boss said.
"It's difficult to go into these games and still look the same, still look like the Bayern Munich that we can be.
"The last 10 or 15 minutes were a little bit a reflection of what pre-season is. There were a lot of changes and it's more difficult to control the game as a coach."
Villa are also adapting to significant changes after Morgan Rogers left for Chelsea last month in a reported British record transfer worth 117 million pounds.
Unai Emery's side will face Paris Saint-Germain in the European Super Cup on Wednesday before beginning their Premier League campaign away to Brighton on August 23.