The man entered the restaurant at 1170 Arnold Drive at 10:04 p.m. armed with a black handgun and demanded money, police said.
The suspect, described as a man between 20 and 25 years old wearing a back hooded sweatshirt and a black hat, made off with cash from the restaurant.
The Subway is located in a strip mall near a busy intersection, and some stores in the area were still open, police said. Investigators are hoping to find witnesses to the robbery.
Anyone with information about the case is asked to call Martinez police at (925) 372-3440.