The 36-year-old has made 602 appearances for United, but announced his retirement on 2 February.
He said: “I am delighted to be given this game by the club, it is going to be a very emotional night, especially as I pull on that red shirt once more.
“I intend to savour every moment and I hope the fans can share in my special night,” he added.
Manchester United manager Sir Alex Ferguson said: “Gary has been a loyal servant of Manchester United and this is a fitting tribute to honour Gary and his career.
“It also gives the fans the opportunity to show their admiration and appreciation for a player who is very much one of them. We have had many great games against Juventus in the past and I am sure this will be another memorable night.”