An elderly pedestrian has died in hospital days after being struck by a car.