The score had been tied 2-2 since Espinoza's second-inning solo homer, but the Nationals finally broke through for another run in the 12th.
Michael Morse led off with a double off Mickey Storey (0-1) and Cesar Izturis came in to run for him. Bernadina sacrificed him to third base, and the pinch-runner scored the decisive tally when Espinoza sent a ground single up the middle.
But Washington had to hang on in the bottom of the 12th as the Astros put runners at first and second with two outs against Tyler Clippard (23rd save).
Brett Wallace smashed a pitch deep into center field that seemed likely to win the game for Houston, but Bernadina made a spectacular running grab just before smacking into the fence, ending the comeback bid.
Drew Storen (1-0) earned the win for National League East-leading Washington, which moved four games ahead of second-place Atlanta with the triumph.
Ben Francisco hit a two-run homer for Houston, which dropped its 11th straight extra-inning contest.
Notable deaths of 2014 [PHOTOS]
Michael Sam cut from the Dallas Cowboys