Before the sack of Troy, Diomedes and Odysseus sneak into Troy and steal the Palladium , a wooden statue of Athena, from her temple. A prophecy stated that Troy could not fall as long as the statue remained. But it's odd that this would anger Athena, who sided with the Greeks during the Trojan War (Paris didn't give her the apple, after all) and the theft of the "Luck of Troy" was the key to the city's fall. Oh well, the gods are nothing if not capricious.
However, during the return home, there is no "error" against Athena. Indeed, from the very beginning of the Odyssey, we see that Athena is Odysseus's constant advocate with the gods, instigating his release from Ogygia (Book 1):
Then the goddess, flashing-eyed Athena, answered him: [45] “Father of us all, thou son of Cronos, high above all lords, aye, verily that man lies low in a destruction that is his due; so, too, may any other also be destroyed who does such deeds. But my heart is torn for wise Odysseus, hapless man, who far from his friends has long been suffering woes [50] in a sea-girt isle, where is the navel of the sea."
The sin of Odysseus's companions was against the sun god Helios, for devouring his sacred cattle. The opening paragraph of the Odyssey makes this plain:
Tell me, O Muse, of the man of many devices, who wandered full many ways after he had sacked the sacred citadel of Troy. Many were the men whose cities he saw and whose mind he learned, aye, and many the woes he suffered in his heart upon the sea, seeking to win his own life and the return of his comrades. Yet even so he saved not his comrades, though he desired it sore, for through their own blind folly they perished— fools, who devoured the kine of Helios Hyperion; but he took from them the day of their returning.
We also read this in Book 12 of the Odyssey as he is relating his story to King Alcinous if the Phaecians:
“Swiftly then to Helios Hyperion came [375] Lampetie of the long robes, bearing tidings that we had slain his kine; and straightway he spoke among the immortals, wroth at heart:
“‘Father Zeus and ye other blessed gods that are for ever, take vengeance now on the comrades of Odysseus, son of Laertes, who have insolently slain my kine, in which I ever took delight, when I went toward the starry heaven and when I turned back again to earth from heaven. If they do not pay me fit atonement for the kine I will go down to Hades and shine among the dead.’
“Then Zeus, the cloud-gatherer, answered him and said: ‘Helios, do thou verily shine on among the immortals and among mortal men upon the earth, the giver of grain. As for these men I will soon smite their swift ship with my bright thunder-bolt, and shatter it to pieces in the midst of the wine-dark sea.’ “This I heard from fair-haired Calypso, and she said that she herself had heard it from the messenger Hermes."
And so he did. A lightning bolt shattered the ship.
It is important to take note of this last part, which I have highlighted, because it refers directly back to the very quote in your original post, which is Hermes telling Calypso why Odysseus's ship was destroyed and the man himself cast away onto Ogygia.
At the moment, I'm putting the mention of Athena in book 5 down to a "continuity error".
This appears to be the original Greek of your passage ( pasted here just so I can find it again):
εἰρωτᾷς μ᾽ ἐλθόντα θεὰ θεόν: αὐτὰρ ἐγώ τοι
νημερτέως τὸν μῦθον ἐνισπήσω: κέλεαι γάρ.
Ζεὺς ἐμέ γ᾽ ἠνώγει δεῦρ᾽ ἐλθέμεν οὐκ ἐθέλοντα:
τίς δ᾽ ἂν ἑκὼν τοσσόνδε διαδράμοι ἁλμυρὸν ὕδωρ
ἄσπετον; οὐδέ τις ἄγχι βροτῶν πόλις, οἵ τε θεοῖσιν
ἱερά τε ῥέζουσι καὶ ἐξαίτους ἑκατόμβας.
ἀλλὰ μάλ᾽ οὔ πως ἔστι Διὸς νόον αἰγιόχοιο
οὔτε παρεξελθεῖν ἄλλον θεὸν οὔθ᾽ ἁλιῶσαι.
φησί τοι ἄνδρα παρεῖναι ὀιζυρώτατον ἄλλων, τῶν ἀνδρῶν, οἳ ἄστυ πέρι Πριάμοιο μάχοντο
εἰνάετες, δεκάτῳ δὲ πόλιν πέρσαντες ἔβησαν
οἴκαδ᾽: ἀτὰρ ἐν νόστῳ Ἀθηναίην ἀλίτοντο,
ἥ σφιν ἐπῶρσ᾽ ἄνεμόν τε κακὸν καὶ κύματα μακρά.