ADMIRAL CARTWRIGHT: To offer the Klingons a safe haven within Federation space is suicide. Klingons would become the alien trash of the galaxy.
The fact that Cartwright calls Klingons "alien trash" tells you everything you need to know about human prejudice against the species. That being said, this passage takes on completely different connotations once the truth about Cartwright's allegiance is revealed.
KIRK: The Klingons have never been trustworthy. I'm forced to agree with Admiral Cartwright. This is a terrifying idea.
We'd expect Kirk to be gung-ho about making peace, but he has too much personal animosity toward Klingons to even consider it. As we see over the course of the film, this animosity blinds him from truly understanding the crisis going on.
KIRK: I've never trusted Klingons and I never will. I could never forgive them for the death of my boy.
Although Kirk's hatred of Klingons is rooted in his past conflicts with them, the real reason behind it is the death of his son at their hands. Is that a rational reason to hate an entire species? Not really. But we can certainly understand why it's worked out that way for him.
KIRK: [to Gorkon] Would you and your party care to dine this evening aboard the Enterprise with my officers as guests of the United Federation of Planets?
Okay—it's not much, but it's a start. Although the dinner date between the Federation and Klingon Empire goes worse than a post-election Thanksgiving meal, it shows that Kirk is at least open to patching things up with the Klingons, even if there are still barriers.
UHURA: Did you see the way they ate?
CHEKOV: Terrible table manners.
Even the crew of Enterprise isn't exempt from prejudice against Klingons. As outside observers, we can see that the main issue with dinner was a difference in customs, but the crewmembers aren't necessary able to step outside of themselves and see that.
COLONEL WORF: I wish to note, for the record, that the evidence against my client is entirely circumstantial. I beg the court to consider this when pronouncing its sentence.
Although this isn't explicitly stated in the film, we think that the legal representation of Colonel Worf (supposedly the ancestor of Worf from The Next Generation) changes Kirk's perspective on Klingons. Here's a guy risking his reputation for the sake of a human. Would Kirk do the same for a Klingon?
KIRK: I was used to hating Klingons. It never even occurred to me to take Gorkon at his word.
After being sent to prison, Kirk realizes that his hatred of Klingons blinded him from seeing the possibility of peace. He might still have some personal prejudices, but he's made the first step toward replacing them with a more accurate view.
VALERIS: Klingons cannot be trusted. Sir, you said so yourself.
Here we see how prejudice can spread like an infection. When leaders like Kirk succumb to this lazy way of thinking, it's only a matter of time before someone lower on the totem takes such beliefs and makes them even worse.
KIRK: Gorkon had to die before I understood how prejudiced I was.
It's a bummer that it took such a tragedy for Kirk to come to his senses, but sometimes that's the only thing that can force us to reexamine our belief systems.
AZETBUR: You've restored my father's faith.
KIRK: And you've restored my son's.
Aw, stop it, guys—we're going to be overwhelmed by the feels. This is a great moment because Kirk and Azetbur are looking past their differences and seeing each other as individuals—specifically by empathizing with each other's grief.