A Peripheral Gateway (PG) is essentially the middle man between your central controller (router and logger) and your peripherals. Those peripherals could be Call Manager (PBX), CVP/IP IVR, Outbound Dialer, Social Miner or ECE among other peripherals. The PG can send and receive route requests from the central controller, this is part of the process of how an ACD selects an agent to route the call to because it's a real-time connection and is always aware.
The CTI works with the PG. CTI is more or less a link between Finesse (agents desktop) and the data in CCE. CTI has several messages that go back and forth with the router (there's an entire white paper on this) and sends data to the database for post call.
Above is very high level, but can deep dive if you have a more granular question