The acidity of a compound depends on the stability of its conjugate base. The more stable the conjugate base, the stronger the acid. In the case of 2-naphthol, the conjugate base is formed by the loss of a proton from the hydroxyl group. The resulting phenoxide ion is resonance-stabilized, which makes it more stable and thus makes 2-naphthol a stronger acid.
On the other hand, carboxylic acids form carboxylate ions upon deprotonation. While carboxylate ions are also resonance-stabilized, the resonance stabilization is not as extensive as in the case of phenoxide ions. This makes carboxylic acids weaker acids than 2-naphthol.