Opening the gate inside the center pit on level 4
On Level 4 there is a pit in the room where you get the scrolls to open the final gate. If you fall down that pit, there is a closed gate with a lever inside and some object that appears to be some sort of key, but can't tell for sure.
I have looked around the place, but there appears to be no hidden switch. Also, toying with spells and lights did not yield results so far.
You need to fall into that cage from the 4th floor. The pit that's directly between the 4 scrolls (which usually has a teleportation field active directly on it) is the one that you need to fall down.
To be able to fall into this pit, you need to deactivate the teleportation field.
There's a button (marked A on the map below) in a hallway outside of the scroll room which will temporarily raise two pit covers (circled on the map) in the scroll room.
You then have to run across those before they collapse again and press a hidden switch on the wall (marked B on the map), which temporarily deactivates the teleportation field.
You then have to run quickly to the center pit (marked C on the map) before the field reactivates.
The timing on this is pretty tight, and there's not much of a margin for wasted movement.
Credit to GameBanshee for the level map