Annan moved to within two points of 10-man Elgin in the Scottish Third Division after coming from behind to win away from home.
Paul Millar headed Elgin ahead after six minutes, beating Annan goalkeeper Alex Mitchell.
Annan drew level 20 minutes later thanks to Jordan McKechnie, who scored his fourth goal of the season with a low effort from just outside the area.
McKechnie put Annan ahead before half-time, sweeping home David Cox's cross from the left.
The home side had to play the second half with 10 men after Stuart Leslie saw red for a second bookable offence on the brink of half-time but Annan held off their opponents in the second half to seal the win over the side who sit just above them in the league.
Elgin: Calder, Niven, Duff, Nicolson, Durnan (Macphee 64), Cameron (Beveridge 82), O'Donoghue (Wilson 82), Cooper, Leslie, Gunn, Millar. Subs Not Used: Black, McMullan.
Sent Off: Leslie (45). Booked: Leslie, Duff.
Goals: Millar 6.
Annan Athletic: Alex Mitchell, Muirhead, MacBeth (Swinglehurst 79), Peter Watson, McGowan, Sloan, Steele, Jardine (Winters 81), McKechnie, Bell (Gilfillan 71), Cox. Subs Not Used: Hyslop.
Booked: Jardine, Peter Watson, Gilfillan, Steele.
Goals: McKechnie 26, 38.
Ref: Des Roache.