People commonly have problems integrating Gmail with Owncloud. If you are not accustomed the technical Email vernacular, the settings can be overwhelming.
Add these lines to the end of the array in your config.php file. Make sure to update the username and password!
'mail_smtpmode' => 'smtp',
'mail_smtphost' => 'smtp.gmail.com:587',
'mail_smtpsecure' => 'tls',
'mail_smtpauth' => true,
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpname' => 'user@domain',
'mail_smtppassword' => 'PASSWORD'
Keep in mind, you are adding this to a PHP array. If you choose to put these options somewhere else within the array, be sure to end the mail_smtppassword line with a comma.