When you offer Guest WiFi, you are creating a bridge between your brand and your customers. This bridge allows for give-and-take, a mutually beneficial exchange: You provide free WiFi access for your customers, and in return, your customers provide some information about themselves (for example, their email address) to help you better understand and serve them.
A Captive Portal consists in a gateway that is the default router for the subnet to protect. Such gateway blocks IP packets destined towards the outside and captures the http and https requests on TCP ports 80 and 443 redirecting them to a web server (called Authentication Server) that show to the user an authentication page. If the user insert the right credentials, the Authentication Server communicates to the gateway that the host of the user is authorized and the gateway forwards the packets outside of the protect network.
In other words, Captive Portal bridges the gap between offering Guest WiFi and collecting user information for authentication and analytics purposes.