The manga came first. Dragon Ball began serialisation in Shonen Jump in 1988, and the anime adaptation reached Japanese screens on April 26th, 1989.
North America had a much longer wait — it did not arrive there until 2003. That gap is why a lot of Western fans encountered the series through edited broadcast dubbing years after Japanese audiences had already finished with it.
It is also worth separating the two titles: Dragon Ball and Dragon Ball Z are distinct series, with Z covering the later, more battle-focused portion of the story. The 1989 date refers to the anime's debut, not to Z specifically.