The hosts reached the close on 423-7, leading by 254 runs at Old Trafford.
Livingstone, captaining Lancashire in the absence of Steven Croft, struck a career-best 168 and shared a third-wicket stand of 245 with Davies (130).
But Somerset took four wickets for 25 runs either side of tea to keep their own hopes of a first win in 2017 alive.
All three results remain possible - a prospect that appeared unlikely after Lancashire had been dismissed for only 109 on day one.
But the home side have a realistic chance of victory after wicketkeeper-batsman Davies struck his second Championship century of the season and Livingstone surpassed the 140 not out he made for England Lions against Sri Lanka A in February.
Their long partnership was broken by Lewis Gregory (3-65), who trapped Davies lbw, but 23-year-old Livingstone continued on, hitting 19 fours and two sixes in his seven-hour innings before falling to the left-arm spin of Jack Leach.
Overton (2-87) had removed Rob Jones and Dane Vilas in the same over before Livingstone's departure, which left Lancashire 191 runs ahead with only four wickets remaining.
Jordan Clark was stumped off Leach for just five, but Ryan McLaren (34 not out) and Stephen Parry (22 not out) remained unbeaten through to the close, setting up an intriguing final day.
Alex Davies and Liam Livingstone scored centuries to leave Lancashire's Division One match with Somerset nicely poised at the end of day three.