Facts
I am using PEAR Mail, I want to use gmail SMTP to send a mail. I have Apache/2.4.27 (Win64) PHP/7.2.0beta3, PEAR 1.10.15, Mail 1.4.1, Net_SMT
Your host configuration shouldn't contain the protocol. The reason it's failing is because it's probably trying to perform a DNS Lookup on ssl://smtp.gmail.com and failing.
host
ssl://smtp.gmail.com
Change
'host' => 'ssl://smtp.gmail.com',
to
'host' => 'smtp.gmail.com',