Portugal controlled the first half, but Croatia keeper Dominik Livakovic repeatedly denied them — most notably with a superb save to stop Bruno Fernandes inside four minutes.
Roberto Martinez’s side controlled possession and created several chances, with Ronaldo firing a free-kick into the wall and Renato Veiga heading over from close range. Despite Portugal’s attacking pressure, Croatia held firm and the teams went into the break goalless.
Croatia stunned Portugal early in the second half when Ivan Perisic finished at the far post after being left unmarked. The goal also saw Perisic become Croatia’s highest scorer in FIFA World Cup history, moving ahead of Davor Suker.
Portugal responded with urgency. Rafael Leao struck the crossbar before Ronaldo had a goal ruled out for offside. Martinez then changed the game by making four substitutions just after the hour mark.
READ: FIFA World Cup: Mikel Oyarzabal Brace Fires Spain Past Austria into Round of 16
The equaliser arrived when Nikola Vlasic brought down Veiga inside the penalty area. Ronaldo stepped up and calmly sent Livakovic the wrong way with a penalty straight down the middle to level the match.
Croatia continued to threaten, with Mateo Kovacic hitting the post and Petar Sucic seeing a goal disallowed for offside. Mario Pasalic then missed a huge opportunity late in normal time before Portugal delivered the decisive blow.
Deep into stoppage time, substitute Goncalo Ramos met Leao’s cross with a well-placed header to complete the comeback and send Portugal into the next round. Croatia thought they had forced extra time when Josko Gvardiol found the net, but another offside decision denied them.
The victory extended Portugal’s impressive competitive record against Croatia to six wins and one draw.
Martinez praised his players’ performance and believed they deserved their place in the last 16.
“The first half was very good, technically and tactically,” he said. “We controlled the match. We just missed a goal. We cancelled what Croatia do very well, which is keep the ball.”
The Portugal coach admitted the contest changed after Croatia took the lead but praised the impact of his substitutes.
“In the second half we had two different matches after they scored,” Martinez said. “We used the players we have. We’ve seen the players coming from the bench adding a lot to the matches. We have to start well and finish even better.”
Attention now turns to a huge last-16 clash against Spain, although Martinez dismissed suggestions that Portugal should be considered favourites.
“When you look at the round of 32, France were superior, but in the other matches the details decided everything,” he said. “The match against Spain will be like that.”
Martinez also praised the atmosphere in Toronto.
“Beautiful facilities, it reminds me of the old-fashioned Premier League. Wonderful field. It’s a shame there aren’t more games in Toronto.”
Looking ahead to Monday’s meeting with Spain in Dallas, the Portugal coach added: “As coach I have to set a roadmap, which is recovery tomorrow and getting ready for Spain. We respect them a lot. We are a team that is self-critical, our emotions were well controlled in the second half and we know we have to continue improving.”