Aboubakary Koïta put the hosts ahead in the 12th minute, but Jude Bellingham equalised in the 32nd. AEK regained the lead through Stavros Pilios in the 75th minute, only for Kylian Mbappé to restore parity three minutes later. Valverde, introduced in the 67th minute, then produced a spectacular finish from outside the area to settle the contest.
AEK coach Marko Nikolic was left with mixed emotions after seeing his side push Madrid so close.
"It is a mixture of pride and sadness. This match is an investment in the future, a point from which we can grow. Their equaliser at 2-2 so quickly was the key. We deserved more. The connection with the supporters was fantastic. There are people who want to destroy it, but they won't. The performance was extraordinary."
Nikolic believed his players had given everything against one of Europe's strongest sides.
"The demands were enormous. The team gave everything, and that makes us very proud. We are sad because we had it so close. That second goal came so quickly. But this is the way forward."
He rejected suggestions that AEK had been too adventurous, insisting they had approached the game with the intention of winning.
"We came into the match to win it, to fight for it. If that ball had gone through, we would have stayed in front. It didn't, and they scored a goal of incredible quality from 25 metres. That's Real Madrid. But we wanted to win. We deserved more."
José Mourinho was delighted with his side's resilience, while acknowledging the quality of the opposition.
"I'm very satisfied, obviously. But we played against a magnificent team that played better than ever. Nothing we had seen from them resembled what they produced today. Jovic was extraordinary. They played very well. We knew how to suffer."
The Madrid coach also praised the contribution of his substitutes and the depth of his squad.
"If these comebacks happen so often, it isn't luck. Only we could win this match. We have everyone in their place. Every player who comes on has importance. I'm very lucky."
Mourinho reserved particular praise for Bellingham, describing the midfielder as unique.
"He's unique. There is no midfielder in the world like him. He's extraordinary. He has work rate, quality... excellent."
Madrid's victory maintained their perfect record in the Champions League league phase, with 12 points from four matches. For AEK, the defeat was painful, but Nikolic insisted the performance offered encouragement for the future.
