You can take the GMAT a nearly limitless amount of times (up to 5 times in any 12 month period, as long as each take is at least 31 days apart). That said, you really shouldn’t have to take the test more than two or three times. Statistically speaking, repeat test-takers often don’t see large increases in their scores—in fact, unless you significantly improve your preparation methods, your score may well go down.
Most business schools say that they only consider your best score when looking at your application. However, you should remember that every school you apply to will see all your scores from any test you’ve taken in the past 5 years. Sometimes a holistic appraisal of all your scores is inevitable. Graduate programs are generally not concerned if you retake the test one or two times, but, if you get up to four, five, or six test scores, schools might start to wonder. If there’s a big discrepancy between your high and low scores, it’s a good idea to use the optional essay to provide an explanation for why you scored better on one test and why your higher score more accurately reflects your abilities.