Austin Barnes, the Dodgers' valuable backup catcher, agreed to a two-year contract extension that will keep him with the team through 2024.