The interruption or suppression of the expression of a gene at the levels of transcription or translation.