GC is forced to run before OutOfMemoryError is thrown. If the JVM implements several varieties of GC (such as "concurrent" or "partial") a "stop the world" GC will be run before the JVM gives up, so every possible effort has been made to avoid the error.
The exception that's being cited is that if the GC repeatedly runs and only recovers a miniscule amount of storage (and heap size cannot be further expanded) then it will toss in the towel rather than continue to run in "crawl" mode. In theory, for this case, slightly increasing heap size would allow a "good" application to run OK, but an app that is slowly chewing up heap (which is not unusual) would not benefit from a slight heap increase, and would encounter the same failure only slightly later.
[It should be noted that in cases where GC is running too frequently increasing the heap size may significantly reduce GC overhead, if the application is well-behaved and just coincidentally happens to be running near the heap limit. (Of course, increasing the heap size to greater than available RAM will usually make the app run slower.)]