Some files in the gradle folder provide important information about how the project can be built. For that reason is suggested that you don't ignore the entire gradle folder.
e.g. the gradle wrapper:
Generates scripts (for *nix and windows) which allow you to build your project with Gradle, without having to install Gradle.
When a user executes a wrapper script the first time, the script downloads and installs the appropriate Gradle distribution and runs the build against this downloaded distribution. Any installed Gradle distribution is ignored when using the wrapper scripts.
The scripts generated by this task are intended to be committed to your version control system. This task also generates a small gradle-wrapper.jar bootstrap JAR file and properties file which should also be committed to your VCS. The scripts delegates to this JAR.
(source)
People argue though that this shouldn't be necessary (check comments on this thread). So it's down to you whether you want to ignore the entire folder or just the .gradle files.