My understanding:
Yes, the incentives count against the cap. Presumably next year's cap.
In general, there are two ways to account for incentives against the cap under the CBA. There are "Likely To Be Earned" and "Not Likely To Be Earned" incentives, simply defined as whether the player achieved those specific terms the season prior. Likely incentives count against the cap in that season. Not Likely incentives don't count for that season, but count in the following season. If a player did not achieve the Likely incentives, that generates a credit against the cap. (Not sure if technically the credit could apply in-year, but in effect it would roll to the next year, since you cannot be over the cap - it probably applies to the following year anyway.)
In this case, you could look at Gronk's results the prior season to see which incentives were Likely. It's possible some would have counted against the 2017 cap, and some in 2018.
If he doesn't reach the targets, but gets paid anyway, that will still count against the cap. Any money paid to players by the team should count against the cap.
Miguel and others can correct the details above.