I agree that in that play the pitcher did nothing to him. But I don’t know what kind of history those two might have, which might be exactly why the pitcher immediately turned his back to Gomez after the ball rocketed off his bat. I’m not saying there is history, just that I don’t know either way.
But even if Gomez was in the wrong, that doesn’t mean policing needs to happen (it’s not a big deal if the occasional batter jaws at a pitcher; other sports don’t have a problem with it), and even if policing needs to happen, that doesn’t mean it needs to happen with beanballs.
Beanballs are a pitcher’s most cowardly way of retaliating because they themselves are not subject to the same retaliation in turn.