Well, almost always. But there are exceptions and knowing those exceptions can keep you from sounding silly.
Those exceptions fall into these categories:
- Words that are shortened versions of other words. For example, la foto is feminine because it's short for la fotografía.
- Words that end in -ista as the equivalent of the English "-ist." For example, dentista can be either masculine or feminine depending on whether the dentist referred to is a man or woman. A few words with other endings are treated the same way. For example, modelo can be either masculine or feminine when referring to a human model, but masculine in other uses (such as when referring to a model airplane).
- Words whose meaning vary depending on the gender. For example, in some areas, la radio means "the radio," while el radio means "the radius" or "radium." Sometimes la radio is used to refer to the communications medium and el radio for a radio set.
- Some masculine words that come from Greek end in -a. Most of these words have English cognates.
- Words that are just exceptions.
el aroma aroma
el Canadá Canada
el clima climate
el cólera cholera (but la cólera, anger)
el cometa comet (but la cometa, kite)
el cura priest (but la cura, cure)
el día day
el diagrama diagram
el dilema dilemma
el diploma diploma
la disco disco (short for la discoteca)
el drama drama
el enigma enigma
el esquema outline, diagram
la foto photo (short for la fotografía)
el guardia policeman or male guard (but la guardia, vigilance)
el guía male guide (but la guía, guidebook or female guide)
el idioma language
el idiota male idiot (but la idiota, female idiot)
el indígena indigenous male (but la indígena, indigenous female)
la mano hand
el mapa map
la modelo female model (but el modelo, male model)
el morfema morpheme
la moto motorcycle (short for la motocicleta)
el panorama panorama, outlook
el papa the pope (but la papa, potato)
el poema poem
el policía policeman (but la policía, police force or policewoman)
el planeta planet
el problema problem
el programa program
el quechua Quechua language
la radio radio (short for la radiodifusión; but el radio, radius or radium; usage of the feminine form depends on the region)
el reuma, el reúma rheumatism
la reo female criminal (but el reo, male criminal)
el síntoma symptom, sign
el sistema system
el sofá sofa
la soprano female soprano (but el soprano, male soprano)
el tanga G-string
el telegrama telegram
el tema theme, subject
el teorema theorem
la testigo female witness (but el testigo, male witness)
el tranvía streetcar
Note: Most words that refer to people's jobs or roles, many ending in -ista or -eta, that can be either masculine or feminine are not listed here. Most have English cognates. Among the abundance of words that fit that category are el/la atleta (athlete), el/la artista (artist), el/la astronauta (astronaut), el/la dentista (dentist), el/la comentarista (commentator), el/la izquierdista (leftist or left-winger), el/la oficinista (office worker), el/la poeta (poet), el/la profeta (prophet), and el/la turista (tourist).
Second note: Also not included in this list are combinations such as el agua (water) feminine words that begin with a stressed a- or ha- and are preceded by el in the singular form only. Others are el águila (eagle), el ama (woman of the house) and el alma (soul). But note that the normal rules are followed in the plural form: las aguas, las águilas, las amas and las almas. See the lesson on substituting el for la.

