America loves to dream an impossible dream when it comes to education. We see our public schools as the bedrock of the equal-opportunity society we wish to be, the land where a poor boy in a log cabin — or a bungalow in Honolulu — can grow up to be president. And teachers are the angel-magicians who make it all happen.

But throughout the history of American public education, this dream has bumped up against some harsh realities. Teachers are, by and large, poorly trained and ill equipped to flatten social, racial and ­economic barriers. Their pay is pathetic (a median of $54,000 in 2012, versus $70,000 for a dental hygienist). So too are the conditions in which they often work. Notions about what constitutes good instruction have always been shockingly vague, and ideas about what to teach and how to measure learning are subject to politics and passing fads.

In “The Teacher Wars,” her lively account of the history of teaching, Dana Goldstein traces the numerous trends that have shaped “the most controversial profession in America.” Along the way, she demonstrates that almost every idea for reforming education over the past 25 years has been tried before — and failed to make a meaningful difference. Long before Wendy Kopp dreamed up Teach for America to place Ivy Leaguers in public schools, we had the Teacher Corps. Before that, Catharine Beecher — “America’s first media darling school reformer” — was recruiting proper East Coast spinsters to go west to teach the unlettered children of pioneers. Decades before we had digital databases to measure teacher performance, administrators in New York, Tennessee, Michigan and elsewhere were devising merit-pay systems based on similar ideas. And 35 years before the Gates Foundation became the 2,000-pound gorilla in American education, the Ford Foundation was throwing its weight around the classroom chasing a similar goal of closing the achievement gap between rich and poor.

Goldstein, a writer for publications like Slate and The Atlantic, begins her ­personality-driven chronicle in the 1820s and ’30s, when the country was first establishing universal public education in the form of “common schools.” She introduces two key figures, both disenchanted with religion, who viewed public education as the path to a kind of secular salvation. Beecher, the sister of Harriet Beecher Stowe, did much to turn teaching from a profession that was 90 percent male in 1800 into one dominated by women. At a time when schoolmasters were often derided as intemperate, rod-wielding tyrants (think Ichabod Crane), Beecher argued that the job was better suited to gentle, pious, unmarried women, who could be paid a pittance since they had no families to support. Horace Mann, the Massachusetts legislator who became the country’s first state secretary of education, was the ­idealistic proponent of establishing ­Prussian-style “normal schools” to train these virtuous, low-cost school marms.