Gout is a systemic problem usually associated with kidney failure. Hydration to help flush the kidneys would be your only at home first aid.
If the nail isn't infected you could be looking at an injury from a fall.
The vet is your best bet in any of these scenarios.