Gary Bollan's side almost went ahead after just six minutes when Raffaelle De Vita nipped in ahead of John Gibson to send a header goalward from seven yards out, only for the ball to rebound from the bar.
Elgin went close twice in quick succession when Kyle MacAulay fired wide in 18 minutes and then Craig Gunn's 25-yard effort seconds later only just cleared Roddy McKenzie's crossbar.
Robbie Winters looked lucky to escape with only a warning when Neil MacDonald fell to the ground as Winters tangled with him after a penalty box David Craig tackle, however referee Brian Colvin decided to take no stronger action.
Elgin continued to threaten, and Joe Hamill rescued his side just before the break, when he booted a Gunn header off the line. Brown and Winters combined four minutes after the break but Gibson denied the on-loan Hearts defender as he rushed from goal to block his shot. Livingston blew another chance in 64 minutes when Liam Fox blazed over after being played in by substitute Andrew Halliday.
The deadlock was broken with 18 minutes left when Keaghan Jacobs curled a cross to the back post and Brown ran in to side-foot home. Halliday missed a great chance to seal the win when he rounded Gibson, but he shot against Craig on the goal-line, before Barr spurned a great opportunity in injury time.
Livingston: McKenzie, Brown, Talbot, Hamill (Sinclair 58), Watson, MacDonald, Fox, Jacobs, De Vita (Halliday 58), Winters (McNulty 70), Barr. Subs not used: Griffin, McDowall.
Elgin City: Gibson, MacDonald, Tatters, Niven, Craig (Inglis 82), Morrison, Gunn, MacAulay, Frizzell, Sutherland (Cameron 78), Crooks (Calder 83). Subs not used: M Dunn, S Dunn.
Referee: Brian Colvin. Att: 503