Sounds like fuel starvation, I'd check your diaphragm in your carb, fuel filter blockage, anything like that. If it starts ok from cold the auto choke will be on calling for more fuel, once it warms up, it goes off, if this is when your bike dies it's a good indicator of fuel starvation.
As to your gauge, check the float by removing it from the tank, simple float devise, careful how you remove it, the float only just comes through the hole. With the ignition on you can move the float up and down by hand, and see how your needle responds if at all, check the contacts, float for damage. If it seems ok but doesn't respond I'd look for loose wire/bad connection.
Make sure you put the float back facing the right way so you get rise and fall in the largest part of the tank.
My gauge would only read from full down to about half and no further, some numpty and installed it wrong and the float was catching on the upper part of the tank !