No, an trigonometric equation that has an infinite number of solutions does not have to be an identity. In mathematics, trigonometric identities are equality relations that involve trigonometric functions and are true for every single value of the occurring variables where both sides of the equality are defined.
Take a simple example such as sin x = 1. The solution set is x = π/2 + 2πk, where k is any integer. So this equation has an infinite number of solutions, because there are an infinite number of integers. But is sin x equal to 1 for any value of x you choose? No, and therefore it is not an identity.