The health ministry said the woman had recently returned from Colombia, where it is believed she was infected.
Zika, which is spreading through the Americas, has been linked to babies being born with underdeveloped brains.
The World Health Organization (WHO) has declared the microcephaly condition, linked to the mosquito-borne virus, a global public health emergency.
The WHO on Thursday also advised countries not to accept blood donations from people who had travelled to Zika-affected regions, the AFP news agency reported.
The link between Zika infection and microcephaly has not been confirmed and the risks at different stages of pregnancy are unknown."
'No spreading risk'
In a statement (in Spanish), the health ministry said the pregnant woman was diagnosed as having Zika in the north-eastern Catalonia region.
It did not release the woman's name, saying she was one of seven confirmed cases in Spain.
It said two more patients were in Catalonia, two in Castile and Leon, one in Murcia and one in the capital Madrid.
"All are in good health," the ministry added.
It also stressed that "the diagnosed cases of Zika virus in Spain... don't risk spreading the virus in our country as they are imported cases".