The tragedy occurred at the Banksia Road Public School when the car collided with a wooden classroom building not long after lessons started.
"The vehicle continued inside the building and tragically we have had a number of young children injured as a result," said New South Wales Assistant Commissioner Stewart Smith.
"As a result of that collision, five kids were urgently conveyed to Westmead Hospital. Tragically, two of those kids, male children, are deceased."
The children who died were aged eight. A further 18 children were treated at the scene for minor injuries.
The woman driver, 52, was being questioned and undergoing alcohol and drug testing.
NSW Ambulance Superintendent Stephanie Radnidge said medics arrived to "a scene of carnage".
"There were a number of distressed and overwhelmed children and teachers at the scene of a horrible accident," she said.
"There was obviously pandemonium."
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.