Lorne Smith's 4-yard touchdown pass to Scott Banerjee with 12 seconds left lifted No. 9 Gilman (5-2, 3-1) to a 32-30 Maryland Interscholastic Athletic Association A Conference win over No. 5 Loyola (4-2, 2-1).
James McIntyre (five receptions, 113 yards) set up the play with his 90-yard kickoff return.
Loyola, which had a four-game winning streak, led 30-25, after Brian Nicholas' 57-yard scoring pass to Ben Fortkamp with 32 seconds left.
The Greyhounds (427 total yards) failed on the conversion attempts after each of their first three touchdowns and had their first lead, 25-24, with 4:49 left.
R.C. Kaufman (151 yards) tied the game at 24 on a 3-yard run, which capped a 14-play, 80-yard drive, and was followed by Corey Popham's extra-point kick.