Sometimes it is said this way: "right smack-dab."
Your phrase is adverbial--it answers the question "where".
It means squarely, directly or exactly
DAB is a chiefly British word meaning clever or skilled, as "a dab-hand at it", a person with a high degree of knowledge or skill in a particular field. It is a corrupt contraction of the Latin adeptus (adept). "Dabster" is another form. Apt is a related word.
SMACK is a transitive verb meaning to strike sharply and with a loud noise.
The earliest recorded use of the phrase in writing comes from an American publication called 'Dialect Notes' which appeared in 1892. There, the sentence used to illustrate the usage was "He hit him smack dab in the mouth." Clearly it means 'exactly there', but you rarely hear it used in Britain, as it is still mainly an Americanism.