agree with the advice given so far, but wanted to chime in because the symptoms are similar to what I was seeing a few years ago that turned out to be my water pump impeller blades had rusted away due to poor coolant system maintenance. Mine never went fully into the red, but got very close before the fan kicked in, and sometimes the fan didn't kick in. Since mine never went into the red, I didn't bother troubleshooting further and just left it the way it was and made sure it never went into the red, which it didn't. A year or so later I replaced the timing belt and water pump, and that's when I noticed the bad impeller. Its gotten better since the new water pump, but my gauge still acts erratically sometimes in the mid-range, so there does seem to be an issue with the temp gauge reading accurately as these bikes get older. Others have reported similar gauge weirdness.
So as has been recommended the first step is to verify the coolant levels are correct at the radiator cap (mine was, and the symptoms were still present). Then do a resistance check on the temp sender when the needle hits the red zone. Its also easy to test that in boiling water off the bike as well.
The spec on the temp sensor is
50C - 130-180 ohms
80C - 45-60 ohms
120C - 10-20 ohms
The spec on the fan thermo switch is:
98-102C - switch closes
Keep in mind that the temp sensor is next to the engine at the thermostat housing, while the fan thermo switch is down low in the radiator. If your water pump isn't properly circulating the coolant, you could have a large temperature gradient between the hot coolant coming out of the engine (temp sensor) and cooler coolant that has been sitting a while in the bottom of the radiator. That could explain why your fan comes on late relative to the gauge reading.