Aleksandar Mitrovic scored in the 90th minute to break Portugal's hearts as Serbia reached next year's showpiece tournament in Qatar thanks to a last-gasp 2-1 victory in Group A on Sunday.
Portugal only required a draw to earn automatic qualification and Cristiano Ronaldo's men were on track after Renato Sanches and Dusan Tadic traded first-half goals in Lisbon.
However, Serbia dominated and were rewarded when substitute Mitrovic headed home late as Portugal were relegated to the play-offs.
"We have no limit, we will analyse everything after this, and we did everything we did perfectly," Stojkovic said post-game.
"We showed in the end that we are better. We have the potential for much bigger things."