The word "baked" is pronounced as:
/ˈbeɪkt/
While "naked" is pronounced as:
/ˈneɪkɪd/
Why are these two words not pronounced the same?
This is a reflection of the Great Vowel Shift, a change in the pronunciation of English which occurred gradually from the mid-1300's to about 1700 (and which helps explain some of the weirdness of English spelling :-). As I understand it, before the vowel shift the "a" in "bake" and "nake" (yes, "nake" is a verb in English, meaning "to bare or uncover", although it's hardly ever used in its present tense form today) would have been a short vowel sound, and the trailing "e" would have been pronounced - thus, "bake" would have been pronounced "bah'-keh" and "nake" would have been pronounced "nah'-keh", with the past tenses being "bah'-ked" and "nah'-ked". (That's why those trailing "e"s are there in English - at the time spelling was being standardized in the late fifteenth and sixteenth centuries those "e"s were still being pronounced :-). As part of the vowel shift, the "a"s changed to a long vowel and the trailing 'e' was silenced, leading to todays pronunciations of "bayk" and "nayk" for the present tense, but while the past tense of "bake" ("baykt") was shortened the same did not happen for the past tense of "nake" ("nay'-ked"). The difference in the past tense forms can, I think, be attributed to frequency of use - as "bake" is much more commonly used than "nake", the past tense form of the former was shortened while the past tense form of the latter was not.
The word "baked" is a past participle, like "picked", and those are generally pronounced with /kt/.
The word "naked", however, is purely an adjective (you might see some uses of the verb "to nake" which would suggest it's a participle, but they're generally obsolete and/or local), like "crooked" or "wicked", and you'll hear /kɪd/ there.
It does seem, however, that the line between those two is getting blurry. You're usually better off just remembering the pronunciation as if there were no rule.
The regular past tense ending -ed used to be pronounced with a separate syllable back in Middle English. So sinned—which is monosyllabic in Modern English—would've been disyllabic in Middle English.
Around the 16th century the vowel in this ending was lost, probably because it was unstressed and weak, and weak syllables are highly prone to deletion/syncope.
After the deletion of the vowel in -ed, the extra syllable was also lost. Therefore the -ed was then pronounced only /d/ when it came immediately after a voiced consonant like /b m n l z ʒ ð/ etc (except /d/, going to explain below).
However, it was pronounced /t/ when it came after an unvoiced consonant such as /p θ s ʃ k/ etc (except /t/). Why on earth was the -ed pronounced /t/?
The reason is because if we pronounced the -ed /d/ after an unvoiced sound, there would be an ill-formed and phonotactically bad sequence of sounds. Every language has a unique set of rules that governs the permissible sequences of sounds (i.e. licit and illicit sequences of sounds), that set of rules is called phonotactics of that language. According to English Phonotactic constraints, two obstruents (/s f t d k/ etc) in the coda (ending of a word) must agree in voicing (i.e. both must be either voiced, or unvoiced) because changing from unvoiced to voiced consonants requires independent movement of the larynx, which can be difficult to switch on and off at the millisecond timing required for consonant clusters. In order to comply with that rule, we change the /d/ to /t/ after an unvoiced consonant (think of /t/ as the devoiced form of /d/ because it's the unvoiced counterpart of the /d/ and changing from one to another doesn't affect the meaning of a word).
For /t/ and /d/, the extra syllable didn't get removed because if we removed it, we'd get geminates in a single syllable which is against the Phonotactics of English. So if we removed the intervening vowel from ended: we would get */ɛndd/ which is ill-formed. Likewise, if we removed the vowel from wanted, we'd get */wɒntt/, ill-formed. That's the reason we add an extra syllable when a word ends with /t/ or /d/ and the -ed is appended to it.
At some point in the 18th century, words with -ed endings were often written with an apostrophe to show the change, for instance, 'sinned' would've been written sin'd. However, it was puzzling in some contexts, for example, it is sometimes unclear whether rap'd represented rapped or raped.
In Middle English, almost all words ending in -ed were pronounced with a separate syllable and this change only applied to the past tense marker -ed. It didn't affect other words that ended with -ed. Most adjectives such as accursed, naked, hatred, blessed, wicked, crooked etc kept the intervening vowel (as we pronounce it today), because the change only affected the past tense marker -ed. It was just a coincidence that these adjectives ended in ed.
Now baked is the past tense of the verb 'bake', so it's pronounced /beɪkt/, the -ed becomes /t/ because of the preceding unvoiced consonant.
Naked is pronounced /ˈneɪkɪd/ and not */neɪkt/ because it's an adjective. It was also an adjective at the time the sound change applied to -ed endings.
The extra syllable from the -ed endings of verbs was lost, but most adjectives and nouns that ended with ed retained it. The ed in adjectives and nouns was not the past tense marker, so the change didn't apply. Verbs that ended with /t/ and /d/ also retained the extra syllable in order to comply with the Phonotactic rules of English. Therefore they're pronounced with an extra syllable in Modern English.