Pullback and homology
This is not necessarily true. For example, there is a space $X$ constructed by attaching a 3-dimensional cell to $S^1 \vee S^2$, which serves as a standard counterexample to several questions. The map $X \to S^1$ produces isomorphisms $\pi_1(X) \to \pi_1(S^1)$ and $H_* X \to H_* S^1$, but $\pi_2 X \to \pi_2 S^1$ is not an isomorphism. As a result, the map of universal covers $\tilde X \to \Bbb R$ does not give an isomorphism $H_2(\tilde X) \to H_2(\Bbb R)$.
By letting $B = S^1$ and $g: \Bbb R \to S^1$ be the universal covering, we get a counterexample.
However, it turns out that this is almost completely an issue with fundamental groups. If $B$ is simply-connected, the answer to your question is yes. A heavy hammer that can be used to prove this is the Eilenberg-Moore spectral sequence.
Here is a positive answer to a slightly different question.
Call a map $X\to B$ "acyclic" if it induces an isomorphism in homology for every coefficient system on $B$. (If $B$ is simply connected then this is equivalent to your hypothesis.) Note that a map $F\to \ast$ is acyclic if and only if the space $F$ is acyclic in the sense that it has trivial integral homology.
Using Serre spectral sequences one can prove the following:
If $X\to B$ is acyclic then for any fibration $Y\to B$ the map $X\times_BY\to Y$ is acyclic.
A fibration $X\to B$ is acyclic if and only if for every point $b\in B$ the fiber over $B$ is acyclic.