The protocol that preceded the World Wide Web for accessing hierarchical information was Gopher.
Released in 1991 by a team at the University of Minnesota led by Mark P. McCahill, Gopher organized online resources as nested, text-based menus. Users could browse documents, search indexes, and connect to other services, including FTP and WAIS. Its file-system-like structure made remote information easier to navigate on the text-oriented computers common at the time.
Gopher was not the same thing as the Web. The Web used HTML documents connected by hyperlinks and delivered through HTTP, while Gopher primarily presented server-defined menus. The early Mosaic browser helped make Web-style browsing more approachable, and Gopher declined after concerns about licensing and its more rigid structure. WAIS was a contemporaneous search system, while Telnet provided remote terminal access and FTP transferred files; none is the canonical answer to this question.