Luis Enrique's side went into the game high on confidence after breaking Italy's 37-game unbeaten streak in the semi-finals.
Spain took the lead in the 64th minute through Mikel Oyarzabal.
But goals from Karim Benzema and Kylian Mbappe saw France take the title.
Enrique gave Gavi his second start in a matter of days at the San Siro.
The Barcelona wonderkid, 17, made his debut for his national side against Italy in the semi-finals.
Despite being so young and inexperienced, he was chosen to start again in the final.
It was a bold call by Enrique but Gavi was extremely impressive during his 75 minutes on the pitch.
In fact, he was so good that Jamie Redknapp, who was working as a pundit on Sky Sports, couldn't believe that he was just 17 years old.
"I want to see Gavi's birth certificate," the former Liverpool and England midfielder said at half-time.
"You cannot be this good at 17. He's absolutely phenomenal! He's so talented. I'm just in awe of him, I love watching him play. He's got everything."
Redknapp praised the youngster once again at full-time, saying: “Gavi’s going to be a superstar if he carries on at this trajectory. He’s got everything, I loved watching him play tonight.”
Gavi's highlights from the game have been compiled by YouTube user Talentz Comps and they are a joy to watch. View them below:
What a talent Gavi is. Spain may have lost but a major positive was Gavi, who put in a performance way beyond his years.
Barcelona are currently in turmoil both on and off the pitch.
HEATED! Does Bruno Fernandes deserve a Ballon d'Or vote? | The Football Terrace
But they have so many young players that look like they will be world-class players for many years to come.
Ansu Fati and Pedri are two names that have already established themselves in the first-team, while it's only a matter of time until Gavi becomes a regular too.