The play opens in the evening in a small Norwegian town, as various friends and townspeople drop in to visit the local doctor, Dr. Thomas Stockmann, and his wife, Katherine. Billing and Hovstad, the editors of the liberal newspaper the People’s Messenger, are already there eating when Peter Stockmann, Dr. Stockmann’s brother and the town’s mayor, arrives. A conservative and traditional man, Peter resists Katherine’s offers of food and takes his brother aside for a stiff discussion of the town’s new bathing complex, which both men have helped to construct and which is expected to be a much-needed boost to the town’s economy. Peter Stockmann criticizes his brother for his freethinking and sometimes impetuous behavior on the baths committee, but Dr. Stockmann waves away his remarks, saying that they’re both working for the good of the community. As the mayor leaves Captain Horster, a sailor recently returned from his last voyage, arrives to share a pipe with the doctor.
Everyone is chatting until Petra, Dr. Stockmann’s adult daughter, arrives home from her job as a schoolteacher with a letter for her father. Dr. Stockmann reads the letter and becomes very agitated, since it contains the results of an investigation he privately conducted into the quality of the new baths; he’s discovered that they are actually full of poisonous bacteria from nearby tanneries, and therefore harmful to people. Dr. Stockmann immediately sends the report to his brother, saying that he will make the findings public and advocate for the baths to be repaired. Hovstad and Billing congratulate him on saving the town from catastrophe and predict that he will be regarded as a hero.
The next morning, Katherine and Dr. Stockmann discuss the curt note that Peter has sent in response to the report. Katherine warns him to be diplomatic with Peter and points out that the baths committee may not welcome Dr. Stockmann’s findings and suggestion of expensive repairs, but he shrugs off her advice, saying that the mayor is just jealous that he didn’t make the major discovery first. Having heard the news around town, Katherine’s father Morten Kiil drops by to ask Dr. Stockmann about his findings, but since he doesn’t understand or believe in bacteria he thinks that his son-in-law is playing an elaborate prank and laughs at him.
Next to visit is Hovstad, who ask Dr. Stockman for permission to publish his findings in the People’s Messenger. He says that the problems with the baths are symbolic of the conservative authorities and their corruption, and that bringing them to light will show people the truth. Dr. Stockmann is taken aback by the idea of attacking the authorities, but just then Mr. Aslaksen, the newspaper’s publisher and head of the Householders’ Association, arrives to commend Dr. Stockmann on his discovery. He assures him that the majority of the town’s citizens will support him and even revere him as a hero. Dr. Stockmann feels pleased and excited in anticipation of this public regard, but he won’t agree to publish until he speaks with his brother.
Soon after, Peter Stockmann arrives. He reprimands Dr. Stockmann for undertaking his investigation alone, without the approval of the committee, and says that he doesn’t believe in the veracity of his findings. Moreover, it would be disastrous to the town’s economy to overhaul the baths now; the only thing they can do is gradually make repairs over a period of years. He also criticizes his brother personally for his individualism, saying that as member of the baths committee he doesn’t have the right to his own opinions. Peter demands that Dr. Stockmann publicly disown his investigations, but Dr. Stockmann refuses and impetuously announces that he will publish his findings in the People’s Messenger. After Peter storms out, Katherine consoles her husband but warns him that standing by his ideas could get him fired, and reminds him to think of his obligations to provide for his family.
In the offices of the People’s Messenger, Billing and Hovstad are editing the essay Dr. Stockmann has written; they are excited that this news might turn the people’s allegiance towards the Liberal party. Mr. Aslaksen, a man who values “moderation” above all, warns them to confine their report to the baths, rather than ranging farther afield and upsetting the authorities. Hovstad and Billing criticize him for his timidity. Soon after, Petra arrives. Hovstad has asked her to translate an English novel for publication in the newspaper, but after reading the book she refuses in disgust, as its moralizing tone conflicts with her beliefs and those of the newspaper. Hovstad tries to placate her by saying that such sentimental stories are necessary to entice people to read the newspaper’s more radical pieces, but Petra is incensed by what she sees as an act of trickery, and fears that a publication with such lax morals will not support her father.
After Petra leaves, Peter Stockmann arrives. He confronts Hovstad and Billing about their decision to print the article, saying that the townspeople will have to pay for any potential repairs to the baths through additional taxes, and that the town will be ruined financially if the baths close. Mr. Aslaksen and the newspapermen are aghast and immediately decide against supporting a discovery that will be so unpopular. Just as Peter is giving them an alternative statement to publish, Dr. Stockmann arrives to check on the status of his piece; he’s oblivious to the other men’s obvious unease, and it’s only when Katherine arrives and accuses the newspapermen of exploiting her husband that Peter’s presence is revealed and the doctor realizes he’s been betrayed. He erupts against the men, saying that as the bearer of truth he won’t be silenced. Meanwhile, Katherine vows to stand by him, despite the detriment to her family’s security.
Dr. Stockmann calls a public meeting in Captain Horster’s house. A group of rowdy citizens arrive; they’ve already decided to support Peter Stockmann, because the People’s Messenger and Mr. Aslaksen are on his side. Dr. Stockmann tries to address the crowd, but Mr. Aslaksen suggests that the crowd choose a chairman first. As the chairman of the Householder’s Association, he is easily elected, and he and Peter Stockmann lead the crowd in voting on motions to prevent Dr. Stockmann from speaking. From the crowd, Billing and Hovstad call out in support, smearing Dr. Stockmann’s character and disowning him as a friend.
Completely enraged, Dr. Stockmann shouts over the other men, saying that the true discovery he’s made in the past days is that the majority of people are ill-equipped and undeserving to have a hand in government. He argues that most men are like dogs, while only some have the intelligence to lead others and make decisions; a society should identify these intelligent men and give them power, whether they are born into the upper or lower classes. The crowd is offended and angry; led by Peter and Mr. Aslaksen, they vote to declare Dr. Stockmann “an enemy of the people,” and the entire Stockmann family has to leave the hall amid taunts and jeers.
In the morning, Dr. Stockmann and Katherine survey their windows, which have all been smashed during the night. They receive a letter from the landlord ordering them to leave the property because they are held in such negative public opinion. Petra soon arrives home, having been fired from her job for the same reason. Even Captain Horster has lost his place on the next sea voyage for hosting the meeting.
Soon Morten Kiil arrives and reveals to Dr. Stockmann that he has spent all the money he planned to leave to Katherine and his grandchildren on shares in the bath stocks. The shares will be worthless if Dr. Stockmann continues on his campaign, but if he retracts his discoveries they will make the whole family rich. It turns out that Morten owns one of the tanneries responsible for water contamination, and he is so determined to preserve his business’s reputation that he tries to blackmail his son-in-law into saving it. Dr. Stockmann is briefly tempted, but ultimately rebuffs the offer. As he leaves, Mr. Aslaksen, Billing, and Hovstad arrive; they’ve heard about Morten’s activities and assume that the whole discovery was actually a plot to allow the Stockmanns to buy stock in the baths at a low price. Believing that Dr. Stockmann is now wealthy, they offer to rehabilitate his reputation in the newspaper in exchange for financial support. Dr. Stockmann realizes that the newspaper is completely corrupt and self-serving, and throws the men out of the house.
The family doesn’t know where to live or what to do, but Captain Horster – the only townsperson to stand by them – offers them the use of his house. Dr. Stockmann vows to recruit young children and start a school to educate them according to his own social principles and raise exceptional young men to change the world. Petra vows to help him. As the final act ends, Dr. Stockmann gathers his wife and children around him and declares that “the strongest man in the world is he who stands most alone.”