Croatia came from 1-0 down to seal the come-from-behind victory and pip Spain to top spot in Group D, with Ivan Perisic striking a late winner after Nikola Kalinic cancelled out Alvaro Morata's opener in Bordeaux.
Ramos had the opportunity to put Spain back ahead in the second half via the penalty spot, but Danijel Subasic produced a save to deny the skipper and keep Croatia in the game.
The setback means Vicente del Bosque's men finish runners-up behind Croatia and will play Italy on Monday in a rematch of the 2012 final that Spain won 4-0.
"We have to dance now with the favourites, but you need to face them so you can be champion," the Real Madrid defender told Telecinco.
"This Euro is just proving everyone can beat you. We need to think game by game."
The 30-year-old added: "It was quite a weird game. We dominated at first, had chances, took the lead... but we forgave them.
"I had the penalty chance but I missed it. It's a pity. At least we got the qualification but we face now a more difficult opponent.
"The team has been good in everything but the result. We could have taken a good result, but we need to move on, learn from this game so we can avoid it in the last-16 round and try to have another clean sheet just as we were doing in our last games."