Lactic acid is the primary acid responsible for the sour taste of milk when it spoils.