It is also the same coat of Mithril that Thorin gave to Bilbo during the events of The Hobbit. Naturally, Frodo wants to try it on, but as he unbuttons his shirt, he reveals the One Ring ...
Gandalf was busier between The Hobbit and The Lord of the Rings than most people realize, but his movements are a mystery to most fans.