No - Struggling away in the small rear cog/large front chainring combo is bad.
Fitness is an overall term that has many components, so:
If you want power you need to work on intervals, which is as fast as possible at full power for short burst times, then recovery time at a middling state.
If you want to train for endurance, being at the steady state for as long as possible, but working to nudge the steady state up to a consistently higher average.
If you want to get somewhere and not be too stinky, riding at 10-20% less than your steady state is good. I (try to) do this on the way to work, but its not easy. I leave the fast run for the scenic route home.
Simply pushing really hard on your gears means you're exerting a lot of force through your knees, and mine ache just thinking about it. Instead you want to pick a gear that keeps you around 90 RPM is the common thinking, but personally I pedal faster. Any lower than 60-70 is going to damage/hurt your knees faster and produce no gain in fitness.