Racism has taken root at the New York Botanical Gardens, where minority public-school students were allegedly kept out of a special art exhibit while white kids were welcomed, according to an explosive lawsuit.

Andrea Chusid claims the Botanical Gardens fired her for complaining about what she described as blatant bigotry.

Chusid allegedly witnessed staff at the Botanical Gardens allow “a group of mostly Caucasian students to view a special exhibition of paintings at NYBG. On the same day, a group composed of mostly minority students … attempted to view the same exhibition but were initially denied entrance,” according to the Manhattan Federal Court lawsuit.

“The group of minority students, along with their adult teachers, witnessed the Caucasian children being allowed to view the special exhibition while [they] … were being denied entry,” Chusid alleges.

The youths from the American Dream Charter School were eventually allowed into the exhibit “but only for a few minutes at the end of their visit,” according to the legal claim.

The allegations are accurate, a school source told The Post.

“It definitely happened and it was a horrendous experience,” said the source.

The school paid nearly $1,000 to bring the kids to the garden for the Kahlo exhibit but an employee refused them entry to the special exhibit, telling them, “As a school group you have to read your policies closer.”

Despite showing the worker receipts for their tickets, the group of befuddled middle schoolers were left standing in the rain, watching white kids file into the exhibit, the source said.

Items on display during New York Botanical Garden’s “Art, Garden, Life” exhibit from 2015.Tamara Beckwith

“They were processing why they couldn’t go in,” the source recalled. “ ‘Is it because we’re Mexican? Is it because I don’t speak English?’ ”

The school complained and got a refund, the source said. Administrators at the American Dream Charter School did not return messages.

“This incident was blatant,” said Chusid’s lawyer, Nicole Grunfeld.

A spokeswoman for the New York Botanical Garden, which sits on city land and gets some of its funding from taxpayers, strongly denied the incident.

The allegations are “not only false, but made out of whole cloth,” Melinda Manning said. “The Garden is renowned for its inclusive children’s programs and the vast majority of the students that visit the garden are located in the Bronx.”

A month before the alleged incident in the Bronx, a group of mostly black Brooklyn high school kids were kicked out of the Guggenheim just 20 minutes into their visit, after a few were accused of unruly behavior.

About 80 kids from Downtown Brooklyn’s Science Skills Center HS were forced to wait an hour on the sidewalk for their bus in April 2015, after one kid allegedly spat inside the museum’s rotunda lobby and another threw a penny off its winding walkway. The school was then banned from the Upper East Side institution.

Plants are displayed at New York Botanical Garden’s “Art, Garden, Life” exhibit from 2015.Tamara Beckwith

At the Botanical Garden, the city’s public school students are supposed to be given free self-guided admission to the 250-acre facility, but are routinely charged for a $20 All Garden Pass, Chusid claims.

Even after shelling out the dough for the All Garden Pass, students in general “were consistently denied access to special exhibitions,” according to court papers.

Chusid says she rose through the ranks at the Botanical Garden for six years until she complained about the way the group of Hispanic kids was treated that day in 2015.

Chusid was canned for “performance deficiencies,” the Garden spokeswoman said.