Ellis nailed the game-winning jumper with 6.7 seconds remaining to give Coppin State (3-3) a 1-point lead.
O.J. Avworo missed a jumper in the lane on the ensuing possession for Navy and Gallo grabbed the rebound to seal the victory for the Eagles.
The Eagles shot 13 for 23 in the opening half (56.5 percent) and led 36-32 at the break, but an 11-for-30 shooting effort (36.7 percent) in the second allowed Navy to stay in the game.
The Midshipmen led 62-61 with 1:13 left before a jumper from Vince Goldsberry put Coppin State back in front 63-62 with 45 seconds left.