Demonstrators holding signs greeted DeVos when she arrived at Jefferson Middle School Academy in southwest Washington, not far from the Department of Education building.
When she headed toward the school's entrance, the protesters stood in front of her, video from CNN affiliate WJLA showed.
DeVos then turned around and walked away, the video showed, with one protester walking beside her shouting, "Go back! Shame, shame" as she got into an SUV and drove off.
In a statement issued Friday afternoon, DeVos said she subsequently got inside the school to meet with students, faculty and administrators.
"I respect peaceful protest, and I will not be deterred in executing the vital mission of the Department of Education," the statement said. "No school door in America will be blocked from those seeking to help our nation's schoolchildren."
the Washington Teachers' Union organized a protest but that union members were not among the people blocking her entry.
BlackLivesMatter DC, the Black Youth Project
and other groups had sent social media messages urging people to protest at the school.
One man was arrested and charged with assault on a police officer, said Officer Hugh Carew of the Metropolitan Police Department.
After the protest, several officials took to social media to say DeVos should have been let inside.
Trump adviser Kellyanne Conway tweeted: "Don't we want the Sec of Education to visit schools?"
Randi Weingarten, the president of the American Federation of Teachers, tweeted: "Just heard a protester blocked & almost knocked Secy @BetsyDeVos down at Jefferson. We don't condone such acts. We want her to go to pub schls."
Video didn't show DeVos being pushed.
Carew said police were investigating allegations DeVos was assaulted.
Arne Duncan, who served as education secretary in the Obama administration, tweeted: "Agree or disagree w @BetsyDeVos on any issue, but let's all agree she really needs to be in public schools. Please let her in."
Washington Mayor Muriel Bowser, a Democrat, tweeted about the demonstration, saying: "This bears repeating: Protest - peaceful protest - is fine but we do not condone violence towards anyone."
A second tweet from Bowser said, "DC has the fastest growing urban school district in America. We welcome @BetsyDeVos & anyone who wants to learn more about our schools."
DeVos was one of Trump's most controversial appointments. Critics complained about her lack of experience with public schools and her bankrolling of efforts such as school vouchers that could take money from public institutions.
She won confirmation Tuesday
after Vice President Mike Pence broke a 50-50 vote in the Senate.
DeVos visited Howard University in Washington on Thursday, the Department of Education said.
The District of Columbia Public Schools said DeVos had "a productive meeting" with students and staff.