A giant piece of iron fell from the elevated A train tracks in Queens and smashed through the roof of a black cab Tuesday afternoon — narrowly missing the terrified driver inside.

Driver Ana Leonardo was waiting to pick up a passenger on Liberty Avenue at 100th Street in Ozone Park when she heard a loud crash through her Camry’s rear window.

“I was stopped here because I had to pick up a customer,” she told The Post, adding in Spanish that she was “asuste mucho” — very scared.

“If something like that comes through the head of people, they’re going to die right away,” said her husband, Manuel Mendoza.

Mendoza told The Post that the two of them share the vehicle, lugging passengers around the city for fares.

“Thank god my wife is fine, but the car is crazy,” he said. “We use it 10 hours a day, so we have no job right now.”

Leonardo is just the latest near-victim of falling subway parts, after multiple similar incidents in Queens in the spring.

Last week, a giant bolt fell off the elevated N/W train tracks in Long Island City through the rear windshield of an in-motion Ford Explorer.

The MTA has said it’s taking steps to install netting and other debris repositories across the transit system.

In the immediate aftermath of Wednesday’s incident, transit chief Andy Byford announced a seven-day review of every elevated subway structure.

“The MTA has said it’s taking steps to install netting and other debris repositories across the transit system,” Byford said in a statement.