There’s a bit in the Woody Allen movie “Sleeper” where the protagonist, suddenly revived after being cryogenically frozen for two centuries, requests a bowl of wheat germ and organic honey for breakfast.

“Ah yes,” a white coat-clad doctor says, a hint of derision in his voice. “Those were the charmed substances that some years ago were thought to contain life preserving properties.”

“You mean there was no deep fat?” his colleague responds, shocked. “No steak, or cream pies, or,” she lowers her voice significantly, “hot fudge?”

The scene, filmed in 1973, was oddly prescient. Not because hot fudge has finally been deemed a health food (sadly). But another substance, then heralded as a “great boon to Americans’ arteries,” is now considered so dangerous that on Tuesday, the Food and Drug Administration moved to remove it from the U.S. food supply.

Yes. Trans fats were once portrayed as healthy — or at least, the healthier alternative to other oils.

[Why the FDA’s new ban on trans fats may be most important change in our food supply ever

Though scientists first started raising alarms about trans fats in the 1950s, it took decades of research, lobbying and slowly shifting public opinion to bring about Tuesday’s FDA announcement. The story of trans fats’ rise and fall tells us a lot about marketing, the power of the food industry and American food culture. But it’s also a testament to our tenuous understanding of nutrition, a realm of science that can feel as baffling and changeable in real life as it was in Woody Allen’s imagination.

Though a few, rare trans fats occur naturally, credit for the invention of artificial trans fats is given to German chemist Wilhelm Normann, according to the Center for Science in the Public Interest. In 1901 he found that pumping hydrogen into liquid oil changed its consistency, giving it the creamy texture of butter. In these “partially hydrogenated” oils, hydrogen atoms were attached to some but not all of the carbons in the chain that make up the fat molecule (thus the term “partially”). What resulted was the first artificial trans fat.

In addition to achieving a butter-like texture, the technique also prolonged the oil’s shelf-life, making it an ideal ingredient for processed foods and restaurant deep-fryers. In 1909, Proctor & Gamble acquired the U.S. rights to Normann’s patent, and a few years later the company was making Crisco, the ubiquitous, spreadable substance that swiftly found its way into Americans’ pie crusts and their hearts.

“It’s all vegetable! It’s digestible!” read an early Crisco advertisement.

“It is wholesome, easy to digest and very rich in food value,” promised another. “It looks clean and pure, and it is.”

Of course, those claims about purity and digestibility could have come from anywhere — the Federal Trade Commission didn’t start regulating false advertising until the 1930s, and even then the rules were lax.

But the truth was that scientists didn’t really know yet whether partially hydrogenated oils — and the trans fats they contained — were bad for you. What people did know was that they were cheaper and longer lasting than naturally occurring fats like lard and butter. The fact that the substance was pale white and pre-packaged and didn’t come from animals also made it seem healthier.  (It also appealed to Jewish consumers, according to Marketplace, which reported that a Cincinnati rabbi once said that the Hebrew race had been waiting 4,000 years for Crisco.) When animal fats became more expensive and difficult to obtain during World War II, shortening and its classier cousin, margarine, slid in to fill their economic void.

[What is trans fat? A look at different kinds of fats]

Mid-century fears about saturated fats — the kind found in butter, milk, meat and cheese as well as coconut and palm oil — were another boon to trans fat’s fortunes. In 1961, Time Magazine ran a huge feature on the work of epidemiologist Ancel Keys, who spent decades studying starvation and subsistence diets and concluded that saturated fats were the culprit behind rising rates of heart disease. (Keys is also the man behind “the Mediterranean diet” as the cure for America’s physical ills, critiquing what he called “the North American habit for making the stomach the garbage disposal unit for a long list of harmful foods,” according to the CDC.

Keys’s high profile work helped launch decades of research into the dangers of animal fats, so that by the time the Department of Health released its inaugural “Dietary Guidelines for Americans” in 1980, an entire section of the document was dedicated to warning people away from fat, saturated fat and cholesterol. At the same time, trans fats were being touted as a healthier alternative to their sinister saturated cousins. Even the CSPI (one of the groups now applauding this week’s FDA decision) jumped on the trans fat bandwagon — in its 1988 book “Saturated Fat Attack,” the group urged restaurants to replace other fats with partially hydrogenated oils, writing: “Overall, hydrogenated oils don’t pose a significant risk.”

According to sociologist David Schleifer, who researches health-care, technology and food at the New York nonprofit Public Agenda, trans fats were thought to be a “perfect solution” to America’s growing disenchantment with saturated fats such as butter and palm oil. Fast-food companies like McDonald’s and Burger King were lauded for using hydrogenated oils in their kitchens, he noted in a 2012 study for the journal Technology and Culture. Part of trans fats’ positive image was thanks to food industry-commissioned studies aimed at proving the fats were safe. But they weren’t the only ones who thought so. As late as 1989, the National Academy of Sciences concluded that trans fats did not meaningfully affect cholesterol levels, making them preferable to their saturated counterparts.

[The 100-year-old scientist who pushed the FDA to ban artificial trans fat]

But in the 1990s, studies about the dangers of trans fats began to emerge. Though researchers had questioned the health effects of trans fats since the 1940s, their doubts didn’t gain traction until a 1990 study in the New England Journal of Medicine showing that the fats raised “bad” cholesterol (low-density lipoprotein, or LDL) and lowered the good kind. By 1994, the CSPI had reversed its position, calling for the FDA to mandate that trans fats be labeled on packaging.

The effort was slow going. First of all, it required hundreds of doctors to reverse their positions on the substance they’d once lauded as a healthy alternative.

“A lot of people had made their careers telling people to eat margarine instead of butter,” Walter Willett, chairman of the Department of Nutrition at the Harvard School of Public Health and an outspoken critic of trans fats, told the New York Times in 2005. “When I was a physician in the 1980’s, that’s what I was telling people to do, and unfortunately we were often sending them to their graves prematurely.”

It also meant that thousands of food manufacturers, who had rushed to use partially hydrogenated oils for their affordability and long shelf life, would have to change their recipes. For a long time, the industry was resistant — nothing made french fries crispy or puff pastry flaky like trans fats did.

“We’re not into knee-jerk reactions,” David C. Novak, chief executive of Yum Brands, which owns KFC, Taco Bell and Pizza Hut, told the New York Times in 2005. “We’ve seen things come and go.” His company was in the early stages of replacing trans fats.

More research emerged, linking trans fats to tens of thousands of deaths from heart disease. Shifting public opinion and new laws requiring that trans fats be labeled, first on packages and then in some restaurants, forced food companies to move away from trans fats by the late 2000s. Even Crisco eliminated nearly all the trans fats in its recipe in 2007. In the past decade, Americans have cut their trans fat consumption by 85 percent, CSPI executive director Michael Jacobson told The Washington Post on Tuesday. The remaining 15 percent are mostly in processed foods — canned frosting, frozen biscuits and microwave popcorn, among others.

Eliminating those lingering trans fats “is probably the single most important change in our food supply, if not in decades, then ever,” Jacobson told The Post. “This action alone will save many thousands of lives each year.”

It’s a sharp reversal for an organization that just 30 years ago reported that trans fats had “no significant risk.” But the trans fat saga shows how hard it is to get nutritional science right on the first try.

[Wellness: Butter, margarine or the latest spread?]

After all, plenty of other foods have seen their health fortunes rise and fall in recent decades. Eggs and butter — those hated saturated fats — are now seeing a comeback. Meanwhile, the popularity of aspartame, the artificial sweetener, swings up and down like a yo-yo: It’s been called one of the most rigorously tested food ingredients in use today, but still consumers are conflicted about whether it’s a brilliant aid to those looking to lose weight or a insidious cancer-causing chemical. (For the record, the scientific consensus is that artificial sweeteners are safe.)

Part of the problem is all the external noise that surrounds the world of health and nutrition science — advertising, lobbying from food corporations, health claims from people with more personality than scientific expertise. There’s so much information out there about what we should be eating, and we’re so fearful of the consequences of getting it wrong, that it’s easy to wind up taking bad health advice.

But even scientists struggle to determine what’s really healthy, Schleifer wrote in his 2012 analysis. He pointed out that human health is the product of a complicated interplay of factors — lifestyle, genetics, how and when and where we get our nutrients — that are very difficult to pin down in a lab.

It’s one thing to find, for example, that vitamin E boosts the immune systems of mice, but quite another to figure out what that means for people. The truth is that lots of nutrients only work in conjunction with others, and the way any chemical affects a body is dependent on qualities unique to that individual.

It’s a difficult recipe to get right.