The Honda rider, started on the second row, but snatched victory on the final lap from France's Fabio Quartararo, on a Yamaha-SRT, who had the lead for most of the race.
The pitch and the square at the start of the three-match series remained covered throughout, with rain lashing the sleepy hill station in the Himalayan foothills.
The England international took advantage of some sloppy defending from the visitors to head home the opener from close range, but Everton levelled before half-time through Dominic Calvert-Lewin.
Kaizer Chiefs remained top of the South African Premiership Saturday despite surrendering an unbeaten record as Jabulani Maluleke gave Polokwane City a surprise 1-0 away win in Soweto.
Tottenham and Chelsea bounced back to form with comprehensive wins over Crystal Palace and Wolves respectively, while Manchester United held out for a much-needed three points with a 1-0 victory over Leicester.
While the manner of their victory was not as convincing as coach Zinedine Zidane might have wished, it was a welcome return to winning ways for Real after they had drawn their previous two games.
The European champions have a history of starting slowly in early kick-offs under Jurgen Klopp and only arose from their slumber after the Magpies took a shock lead through Jetro Willems on seven minutes.