Arfa Karim Randhawa was 16. She died Saturday night after complications resulting from an epileptic stroke.
After she was taken to hospital, Gates offered to pay for her medical care, reported the Daily Mail.
He also proposed moving the wonder kid to the US for better treatment.
Her father, Amjad Karim, said that Bill Gates was saddened to learn of her death.
He thanked Bill Gates and said that his daughter was a spark that "got attention and love from everyone on the globe".
Arfa Karim went into a coma Dec 22 after suffering an epileptic attack and cardiac arrest.
She was admitted at the Combined Military Hospital in Lahore where she suffered a tracheotomy complication Saturday evening.