In the GBA games, the Mystery Gift is obtained through a survey in the Poké Mart. In Diamond, Pearl, and Platinum, go to the third floor of the Jubilife City TV Station and speak to the man with the beard and glasses. When he asks your opinion on TV, tell him "Everyone" and "Happy." To his next question, answer "Wi-Fi" and "Connection." He'll be surprised, tell you to save, and after saving and returning to the title screen, a "Mystery Gift" option will appear beneath your save file. Select it to claim your gift.