The Prime Minister said that the abuse, which included monkey chants directed at Raheem Sterling and Jude Bellingham, was "completely unacceptable".
He urged Fifa, world football's governing body, to take "strong action".
Deafening jeers greeted England's players taking the knee before kick-off and Sterling was pelted with missiles when celebrating the opening goal.
Gareth Southgate's team won the qualifier 4-0 at the Puskas Arena in Budapest.
Mr Johnson wrote on Twitter: "It is completely unacceptable that @England players were racially abused in Hungary last night.
"I urge @FIFAcom to take strong action against those responsible to ensure that this kind of disgraceful behaviour is eradicated from the game for good."
Fifa said "adequate action" would be taken in regard to the abuse.
The world governing body said in a statement: "First and foremost, Fifa strongly rejects any form of racism and violence and has a very clear zero-tolerance stance for such behaviour in football.
"Fifa will take adequate actions as soon as it receives match reports concerning yesterday's Hungary-England game."
The Football Association said in a statement: "It is extremely disappointing to hear reports of discriminatory actions towards some of our England players.
"We will be asking Fifa to investigate the matter.
"We continue to support the players and staff in our collective determination to highlight and tackle discrimination in all its forms."