Recent performances had offered some encouragement against quality opposition but the Scots were dominated in the opening stages by the impressive Croats.
Part of the issue was self-inflicted errors.
Kenny McLean gifted Andrej Kramaric a chance; Luka Sucic spurned another; then Kramaric’s shot bounced wide after scraping off Craig Gordon’s studs.
That was all within the opening 10 minutes.
Croatia were in total control but the narrative changed when Orel Grinfeeld produced a second yellow card for, what seemed, a nothing challenge by Petar Sucic on John Souttar.
That was the key moment. Croatia were furious, Scotland regrouped at the break, and the complexion of the contest turned on its head and paved the way for this long-awaited win.
Suddenly, Scotland were the dominant side and Doak became increasingly influential.
Billy Gilmour should have played in the teenager in acres of space in front of goal but blazed over instead. The Napoli midfielder did so again shortly afterwards from Doak's pull back.
Doak himself diverted a back-post volley just off target from a teasing Ryan Gauld cross.
Croatia remained a sporadic threat. Substitute Mario Pasalic got in from Luka Modric's wonderful ball and ought to have scored, but dinked it just past a post. It was a huge let-off.
And it was punished as Doak got to the byeline and flashed a shot at goal. Kotarski flapped it towards McGinn, who was the hero once more.
Scotland looked for the second goal that would have given them the head-to-head advantage over Croatia, but it was not forthcoming.
Instead, they will go to Poland with their sights on a relegation play-off and relying on Portugal winning in Split to have any chance of an unlikely second-place finish.