These are academic tests required for admission to degree programmes.
Contact your institution to find out which test you should take. The tests are constructed in different ways and are arranged on different dates. If both tests are accepted you can choose the test that best suits your application deadline.
Master-level or PhD programmes
Both test similar skills and have a similar level of difficulty. While the GMAT is specifically designed for MBA programmes and graduate business schools, an increasing number of MBA programmes accept the GRE as part of their admissions process. However the GMAT would not be appropriate, for example, as an entrance requirement for a Master's in social anthropology!
Check the institution/programme’s entrance requirements. If both are accepted, you should be able to choose the test that best suits your appilcation deadline.