Maverick is a great pilot (Situational Irony)
A subtle irony that recurs throughout the film is the fact that, in spite of his foolishness and inability to stick to the rules, Maverick is consistently one of the best pilots in his coterie. When Stinger calls Goose and Maverick into his office at the start of the film, he begins by scolding Maverick for being so reckless, before informing him that he wants to send him to the elite Top Gun. Then later, when Maverick says that he is the best pilot in his first class at Top Gun, Viper tells him he is being arrogant, before adding, "I like that in a pilot." This push and pull between Maverick's talent and his cockiness is operational throughout the film, and often, when the viewer thinks that Maverick is about to be chastised, he is praised or promoted. This subversion of expectation creates some irony in the screenplay.
Iceman Needs to Be Saved (Situational Irony)
Another subtle irony lies in the fact that Maverick is, indeed, a better pilot than Iceman, even though Iceman ends up getting the trophy at the end of their time at Top Gun. In the rescue mission, Iceman ends up in a sticky situation and Maverick saves him. While Maverick has been characterized as the "dangerous" one in his class, he ends up being the most helpful and benevolent in the end, while Iceman, who has been framed as the most competent naval aviator, ends up being the most helpless.