To get good sources for Weisenheim am Berg is very difficult.
From the 8th century on the century was part of the Herzogtum Franken (old German Stammesherzogtum) and later on (I couldn't find an exact date) it belonged to the Grafschaft Leiningen-Dagsburg until the end of the 18th century.
The problem was due to the division of the estate that these Grafschaft was divided, put together and divided again. If I understood that what I read in the right way, Weisenheim am Berg belonged at the beginning of the 18th century to the (partial) Grafschaft Leiningen-Dagsburg-Hardenburg (from 1779 on Fürstentum).
So Weisenheim am Berg was never part of Bavaria or Hesse.
From 1798 on it is easy. But to verify the political affiliation before you will need a very specialized historian for that area.