Urban dictionary doesn't tell me anything about why the Warriors are called the Dubs or why Golden State is called Dub City.
"Dubs" is a shorter way of saying "Ws." The full pronunciation of "Ws" would be "double yooz," so it's abbreviated to "dubz" as a slangy way of referring to the team name (Warriors):
Warriors -> Ws (double yooz) -> Dubs
By the same token, "Dub City"->"W" City->Warriors City
Similarly, George W. Bush was/is sometimes referred to by the nickname "Dubya," in reference to his "W" middle name (Walker).
(One other example of a "W" name being shortened to "dub(s)": Buffalo Wild Wings is referred to as B-Dubs.)