What is the output of
gpg-connect-agent --dirmngr 'getinfo dnsinfo' /bye
and what is the content of your /etc/nsswitch.conf and /etc/resolv.conf ? Is there anything special in your /etc/hosts? Are you using any kind of non mainstream DNS resolver on your system or network?