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 has yet to respond to the PA news agency’s request for comment.
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.”