Gilman must sit out a season under NCAA transfer rules. He has three years of eligibility remaining.
"I'm extremely grateful to be a part of the Notre Dame family," Gilman said in a statement. "I'm thankful to the coaching staff and the man above for not only believing in me, but also providing this opportunity. I'm excited for this next chapter in my journey."
Gilman last week told the Capital Gazette that "the desire to become a Naval officer just wasn't there."
He had a game-high 12 tackles in Navy's 28-27 victory over the Irish last season.
"Alohi is a great fit here in terms of his character and also what he wants to achieve academically," Notre Dame coach Brian Kelly said in a statement. "Clearly, that's primary in our recruiting. Secondly, in terms of his football fit, we got a good look of him against us last season. He plays the style of safety we want in this program. Alohi's a run-and-hit safety that fits perfectly in the Mike Elko defense."