Apple's argument was that Gradiente didn't release a product with the iPhone name until December of 2012, the Android-powered iPhone Neo One, and that their exclusivity should be canceled through expiration. The chairman of Gradiente has stated that they're perfectly open to negotiations with Apple.
I couldn't be further from an Apple fan, and I'm certainly not familiar with Brazilian trademark law, but I think Apple's complaint has merit. Gradiente Electronica sat on the name for years and apparently didn't release a product until Apple had already popularized the iPhone name. That's shady business, right there.