The gemara says, "just as when Av arrives, we lessen our joy, when Adar comes, we increase our joy" (Ta'anis 29.). We understand why we must lessen our joy in Av, since these are the days that the Beis HaMikdash was destroyed, but why should we increase our joy in Adar. The Meor Einayim asks this question:"When Adar begins, we increase joy. But why? The miracle [of Purim] happened on the 14th and 15th of Adar, so why should we be happy starting from the beginning of the month?"
The Meor Einayim answers, "The names of the months have meaning... The translation of א-דר the Alef dwells. The Alef is the Alufo Shel Olam (Master of the World)… דר means that Hashem dwells with people and His Shechinah resides in this world…" So the joy of Adar is that Hashem's Presence resides, and is perceived, in the world. The parashah that is read on Shabbos is related to the time of year it is read. Parashas Terumah is read in the month of Adar, because their themes are similar. Terumah teaches us how to build the Mishkan. The purpose of the Mishkan was so Hashem can dwell among us. As the passuk states, "Build me a sanctuary, and I will dwell among them" (25:8). Adar is also a דירה, Hashem's dwelling among us. Now we understand why the gemara contrasts (and compares) Adar to Av, as it says, "Just as when Av comes, we lessen our joy, when Adar comes, we increase joy." Why is Av mentioned? It could have simply said, "When Adar comes, we increase joy." The answer is the gemara is showing us that the joy of Adar is the exact opposite of the mourning in Av. In Av we mourn the destruction of the Beis HaMikdash, and in Adar we rejoice with building the Mishkan, the דירה, Hashem's presence in the world.