Strictly speaking it was a goal as a free kick wasn’t given.
But once the Ref saw what was happening he should have stopped it.
Nani clearly handled the ball and dived (he is the best diver in the Premier League).
Still, it could only happen to Gomes The Clown!