In Android Studio you can fix this by simply adding this to your Gradle file:
compile 'com.google.android.gms:play-services:6.5.87'
EDIT
Now, due to updates and new Gradle API the line you should use is:
implementation 'com.google.android.gms:play-services:12.0.0'
One more important tip: Avoid using bundled version of Google Play Services, but consider declaring just dependencies that your app needs to reduce it size as well as to reduce unnecessary hit to 65k methods limit. Something like (i.e. for Maps) this would be better than general play-services usage above:
implementation 'com.google.android.gms:play-services-maps:12.0.0'