Actually in the terms of the story it was perfectly possible: a ziggurat was a substitute mountain, and mountains were the places that gods came to talk with humans. A “tower with its top among the heavens” was just a structure sufficiently like a mountain it would serve as an interface between the realms.
The mistake most commonly made about this is thinking that the builders regarded heaven as “up there” so they intended to build high enough to cross the border. The reality is that they conceived of heaven as a realm that could interface with this realm and they meant to build a suitable location.