Maguire is the club captain but has been relegated to being third or fourth-choice centre-back in the Manchester United squad this season.
Bruno Fernandes has been captaining the side in the absence of the centre-back and the Portuguese again led the Red Devils out against Newcastle United in the cup final on Sunday.
However, with Manchester United on the verge of winning, Ten Hag introduced Maguire into the proceedings to close out the game and he wore the captain’s armband for the last few minutes of the EFL Cup final.
The England defender and Fernandes jointly lifted the trophy and Gray praised Ten Hag for doing the classy thing of giving Maguire a few minutes on the pitch.
He believes the defender is clearly not part of the Dutchman’s plans, but the Manchester United manager still ensured that he felt part of their success.
Gray said on beIN SPORTS: “It’s another example of Ten Hag and what he is doing.
“With Maguire, what he did tonight, it was another class act to get him and make him feel more a part of it when he obviously isn’t a part of it.”
Whether Maguire starts when Manchester United take on West Ham at Old Trafford in the FA Cup on Wednesday night remains to be seen.