The correction that clarifies the antecedent for "it" is:
"When he opened the clock and looked at the gear, he noticed the gear had a chunk missing."
This option explicitly identifies "the gear" as the subject, making it clear that the gear is the broken item being referred to.