I guess that depends on how loose you definition of "discover" is. Obviously, we only refer to human discoveries as discoveries. So any species that may have been here before us, no matter how intelligent or unintelligent, will not get credit from us as earth's discoverer.
Traditionally, earth is considered a "state of infinity" from a discovery standpoint. Like with Newtonian Gravity, it existed incredibly long before it could be explained.
I guess if you use Newton as a precedent (can the precedent occur after the thing we are trying to correlate it to?) then the person who discovered the earth would be the person who figured out what it was, and how it behaved.
This will be a tough thing to give credit for, seeing how most of our understanding of earth is the compilation of hundreds of generations of study and observations.
Do you credit Copernicus, Kepler, and Galileo, for identifying it's location in our solar system? Someone before them, for "discovering" it was not flat? The first human, for "discovering" that there was stuff beneath his/her feet?