I assume you have already identified the correct driver of your wifi device. If not, you can find help here. Sometimes, compiling it as a module instead of built-in can help. It also helps in situations when resuming from hibernate.
Emerging net-misc/networkmanager
with the wifi
-useflag should be fine after the kernel has loaded the wifi device driver. You can check/pretend how portage would install networkmanager the folliwing way:
emerge -pav net-misc/networkmanager
If you see a wifi
without a -
in front of it, you should be good to go. Note, that some window managers have useflags enabled by default, that install networkmanager for you. Then it would be better to add -1/--oneshot
to the parameter list of the emerge-command above, so that it will not be recorded in your world file.
Btw., I had generally good experience, installing Gentoo with ethernet plugged in and deal with wifi after the window manager is installed. But if you want to use a window manager that does not provide a GUI to configure it, I would suggest looking at the option presented in the Gentoo handbook here and here.