I would start by looking real close at the rest of the wires in there. Especially from the ignition switch to the battery (along whatever path that takes) to make sure there are no other damaged wires upstream.
That much magic smoke indicates pretty close to a dead short. I would also unhook all the wires from the gauge and test it for being shorted to ground. That will tell you if the short is in the gauge itself or in how it is hooked up.
With that information you can decide how to proceed. Replacing the burned section of wire is a given, but depending on what you find there could be different options for what else you need to do.