Oh, this episode. You were doing so well before that last scene. Shanna has detailed why it is dumb from a logistical perspective (Hook flaunts his crimes, rather than hiding them; there's no reason for Hook to be there at all; if he wants Robert dead, he shouldn't have saved him in the first place, etc), but I'm more concerned about how bad it is from an emotional perspective.
Yes, I get that "I killed your father/grandfather" isn't generally the kind of thing you just say "my bad" about and move on. So, in emotional terms, it should theoretically work as a conflict. But in the first place, we have the background in which these people are best buddies with Regina, who killed Snow's father, among a host of others. So even if Hook feels terrible about what he did, as he should, it doesn't work for the show to try to wring serious drama out of it, as there's never any doubt that this is something he'll be forgiven for, as every other villain has been repeatedly forgiven. This is especially true when you add in his more recent history of saving Charming and his loved ones one multiple occasions.
But more than that, it is an idiotic conflict for the show to raise now. Hook has proven himself again and again. David has gone to pretty much literal hell to save him. He and Emma are confirmed true love. That doesn't mean that a bombshell like this -- at least in a show that didn't feature everyone being besties with Regina -- wouldn't, in real life, still generate real emotional turmoil. But it simply isn't interesting to watch. For comparison, there are occasions in which, tragically, a person suffers multiple losses of loved ones in a short time period. And, naturally, they're going to grieve for each of them. But if I'm writing a family drama, I'm not going to have my character lose his mother in the first half of season 1, and his sister in the second and his father in season 2, because that would be repeating the same emotional beats over and over again. Similarly, Hook did something terrible/we can't trust Hook/actually now he's a hero and a good man is a plot that has been thoroughly played out by now.
If the show had to do this plot, they should have made David and Hook together experience the memory of Hook killing his father (ideally in less stupid circumstances). David's immediate, hot-blooded impulse might have been to kill Hook, who wouldn't fight it. Then he calms down, and tells Hook something along the lines of "I know you've changed. And it isn't like I didn't know you had killed before, or that you're the only person in this town with a lot to atone for. That one of the people you killed is my father doesn't change who you were, and who you've become. But Killian, you have to talk to Emma. Not to tell her that you killed one of the grandfathers she never knew, but to really tell her about your past, so that she can confront what it means to be with someone who has done so much bad." Then, while the viewer wouldn't have had to hear most of the confession, we could end with Hook talking to Emma. Emma, in the next episode, forgives him but tells him she needs a little time to process all of this - emphasizing that she is not rejecting him --, but Hook in the interim decides to go off on another quest to prove himself.
This would create a dramatic scenario and give pretext for delaying the Captain Swan resolution while staying true to the characters and the show, and without cheap attempts to wring false tension out of more lies and deceit.