The Great Pyramid at Giza was the tallest building for a long time if I'm not mistaken. What other ancient buildings (that we know for sure existed) were comparable in height, and what was the first building to surpass it?
According to Wikipedia, the great Pyramid was the tallest manmade structure in the world (at 481 ft) from the time of its completion around 2560 BC until the construction of the Lincoln Cathedral around AD 1300, some 3,800 years later.
It looks like only a few other ancient structures were close to being as tall as the great pyramid, including some of the other Egyptian pyramids, and also the lighthouse at Alexandria (source).