The warning is a normal recommendation message and it isn’t harmful for battery or phone. Phone will start recharging once returning to normal temperature.
You can follow below actions to make phone return to normal temperature:
1) It isn’t suggested to expose your phone in the sunshine for long time;
2) Close large power consumption applications, such as music, chatting applications, GPS application, video streaming etc.;
3) Reduce the brightness of screen to lower the temperature