Sergio Ramos' controversial finish put Zinedine Zidane's side ahead before Atletico striker Antoine Griezmann missed a penalty.
However, substitute Yannick Carrasco sent the Champions League final into extra-time with a close-range finish.
Cristiano Ronaldo struck the winning penalty after Juanfran had missed.