The 23-year-old joined United at the age of 10 and has now put pen to paper on a contract extension that will keep him at Old Trafford until at least 2018.
Johnstone has spent much of his senior career out on loan and is yet to make a first-team appearance for the Red Devils.
"I am delighted to have signed a new contract. I have been with the club since I was 10 years old and have grown up here," he told the club's official website.
"The last 13 years have flown by and I have enjoyed every moment of my time here so far. I am working with world-class goalkeepers every day and now I am going to use all that experience to push myself and show the manager what I can do."
Manager Jose Mourinho added: "Sam is a goalkeeper with great potential. He is a very professional young man with a great attitude to the game. He has progressed immensely even during my short time at the club. I am delighted he has committed his future to Manchester United."
Johnstone was most recently named on the bench for United during their Europa League victory over Zorya last month.