Trees first evolved some time in the Devonian and Carboniferous periods. Before trees, the largest organisms on land were Prototaxites. A metre wide, eight metres high … and a fungus.
Well, we think they were a fungus. They certainly look like one: tubes and filaments woven around each other, gradually adding layers like a tree trunk as they aged. There’s some evidence that they may have also included symbiotic algae, which would have made them effectively a kind of giant lichen. Some researchers have theorised that they may have had roots and leaves, but the evidence isn’t here yet to confirm those possibilities.
At their height, during the Devonion period, Prototaxites would have easily towered over everything else on land. To be fair, everything else on land was mostly moss and insects, but still, and once trees evolved they were pretty much doomed.