Which German dialect is closest to Standard German?
Do you mean...
... where in Germany do people today speak something that sounds like Standard German?
or
... which German dialects of today are closest to Standard German?
or
... which historical German dialects were closest to Standard German as it formed?
To the first question, the answer is: most of Northern Germany except for the Frisian coasts. In large parts of Northrhine-Westphalia, Lower Saxony, Northern Hesse, Saxony-Anhalt, Brandenburg, Bremen, Hamburg and Mecklenburg-Vorpommern, there is not much dialect spoken anymore.
To the second question, the answer is Middle German dialects - a continuum from Saxony over Thuringia to Hesse.
To the third question, it depends on which period of standardisation you`re looking at.
In many ways, Standard German writing corresponds to the phonetic structure of High German, i.e. what was spoken in the Southern parts of Germany, in Austria etc.; considerably more so than it does to Low German. We`re talking about differences which came about during the Middle Ages. High German influence - the second Germanic consonant shift - seeped North into regions where no High German dialects had been spoken and were some of the changes were incorporated, thus bringing forth Middle German. Similar developments happened when Germans settled in Eastern Europe, creating a variety of syncretic new dialects all sharing a lot of similarities with what is labelled "Middle German" or "Central German".
With Luther`s translation, which was based on_this_Central German (i.e. after the second consonant shift), this Central German gained enormous influence.
If we`re talking about the centuries in which compulsory schooling under the paradigm of standardisation occurred - mostly the 19th and the first half of the 20th century -, we`re already talking about an age when many Central German dialects had lost their vitality and assimilated, too; so much of Central Germany was speaking a slightly regionally coloured Standard already.