Andy Dalton is correct: the Gentoo boot CDs don't work in a UEFI environment (they do have EFI stubs, but IIRC they're for older Macs; in any case, they don't work.) That said, you can use any other boot DVD that does support UEFI to bootstrap the Gentoo installation, as the initial phase is all done in a chroot anyways. You may want to consider that the VirtualBox UEFI environment was (is?) a little strange; I generally use BIOS mode because it's simpler in a VM.
However, if you really do want to install in a UEFI environment, the method that worked for me is the following (I haven't done this in a while):
- Create an Ubuntu Server boot DVD (I used 17.10, but anything with UEFI support probably should work, including other distros.)
- Make sure that your VirtualBox host has the hard drive attached to a SATA controller. This is critical: only SATA controllers work in UEFI mode.
- At the Ubuntu boot menu, choose "Rescue a broken system".
- Answer the country, keyboard, hostname and time zone prompts.
- When notified that no partitions exist, select Continue.
- Choose "Execute a shell in the installer environment" (or press Alt+F2 to go to another console: I prefer this method.)
- Ensure that your network is set up.
- Partition your drive following the Gentoo handbook instructions. Make sure you follow the GPT instructions and format the EFI partition with FAT.
- Continue following the Gentoo handbook, making sure to heed the warning to make /dev/shm (warning when using non-Gentoo installation media.)
The rest, I believe, should work OK. As I mentioned before, it's been a while since I tried this in VirtualBox, but I've had success doing this using a generation 2 Hyper-V VM.