Essentially it's a case of aromaticity vs number of resonance
Aromaticity is a very strong driving force so aromaticity wins out; Huckel's rule is more important than the number of resonance structures. Therefore cyclopentadiene is more acidic than cycloheptatriene. Even though we can draw 7 resonance structures (one with a negative charge on each carbon atom) for the tropylium anion and only 5 for the cyclopentadienyl anion, Huckel's rule tells us that the cyclopentadiene anion ($4n+2$ π electrons, $n=1$) is aromatic while the tropylium anion with 8 π electrons (doesn't fit $4n+2$) is not.
Another example is cyclooctatetraene.
Like benzene, we could draw resonance structures by shifting the double bonds in this molecule too. But this molecule is not aromatic, it does not fit the $4n+2$ rule. In fact, Huckel says with 8 π electrons it is antiaromatic. To avoid this destabilization cyclooctatetraene adopts a tub-like conformation.
Again aromaticity trumps resonance structures.
Edit: Huckel's Rule: Aromaticity - Antiaromaticity
If we look at the energetic positioning of the molecular orbitals (MO's) in a cyclic, conjugated polyene, we can quickly understand the basis for Huckel's rule.
We can use Frost diagrams to determine the energetic positioning of these MO's. Here is the diagram for benzene, we see that all of the pi electrons are in bonding MO's, the molecule is a stable aromatic that fits the $4n+2$ rule ($n=1$).
Here is the diagram for cyclooctatetraene, and we see that not all of the electrons are in bonding MO's, two π electrons are in non-bonding MO's. They don't contribute to bonding or stabilization.
This is a $4n$ π electron compound ($n=2$) and accordingly would be classified as antiaromatic by Huckel's rule. As mentioned above, the compound adopts a non-planar conformation to avoid this destabilization.