The incident began around 6:45 p.m. on the 2200 block of Key Boulevard, near the El Cerrito border.
Officers arrived at the scene to assist Contra Costa County's A3 mental health crisis response team with a welfare check.
Police say the suspect barricaded themself inside the home and fired multiple rounds at officers from the residence.
An officer was struck by gunfire and transported to a local hospital, where they are listed in stable condition.
The suspect eventually exited the residence and was taken into custody.
The incident triggered a heavy police presence in the area, prompting an hours-long lockdown.