UEFA announced the ban on home fans – which is for two matches, with one suspended for a probationary period of 12 months – on Monday.
Portugal beat Serbia 4-2 in Belgrade in a Euro 2020 qualifier in September that was marred by the behaviour of the home supporters.
UEFA charged the Football Association of Serbia with six offences, including racist behaviour, illicit chants, the setting off of fireworks and field invasions by supporters.
— UEFA EURO 2020 (@UEFAEURO) September 7, 2019
There were also two charges for a late kick-off.
A UEFA statement said the organisation's control, ethics and disciplinary body would "order the Football Association of Serbia to play their next two UEFA competition matches as host association behind closed doors, the second of which is suspended during a probationary period of one year, for the racist behaviour of its supporters".
UEFA added: "The Serbian FA is ordered to display a banner with the wording #EqualGame with the UEFA logo on it, in the next UEFA competition match which the association will play as the host".
The Serbian FA was also hit with a €33,250 fine, while Ljubisa Tumbakovic was warned about the late kick-off.
Photo Getty Images Caption: Serbia coach Ljubisa Tumbakovic was warned for a late kick-off among UEFA's many punishments.