First of all we need to clarify that you should have 2 build.gradle files. One of them is a project-level file and the other one is an app-level Gradle file:

These files should look like this:
Project: StackOverlfow build.gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
classpath 'com.google.gms:google-services:1.5.0-beta2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
Module: app gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.example.package"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services-auth:8.4.0'
}
If you don't have Google Play Services installed, please do the following:
- Go to Android Studio -> Preferences -> Appearance & Behaviour -> System Settings -> Android SDK.

- You'll see on the bottom part a "Launch Standalone SDK Manager".
- Click that and you'll have the standalone SDK Manager window opened.
- Scroll all the way down to "Extras" pick "Google Play Services" and hit update.

This will install the proper play services packages. Once done, go back to the Android Studio and re-sync your Gradle file.