Whatever a stack is, it should in particular be a functor $\text{CRing} \to \text{Gpd}$ from commutative rings to groupoids (a prestack). Groupoids naturally form a $2$-category and so such functors also naturally form a $2$-category. For example, there are constant prestacks with constant value some groupoid, and then $2$-morphisms between these are $2$-morphisms between the corresponding groupoids. The connection back to the topological story is that groupoids model homotopy $1$-types by the homotopy hypothesis, but at this category level it is possible to be more explicit.
(In other words, my claim is that there are spaces hiding in the story of stacks, namely the values of those stacks on various rings.)
Example. Let $G, H$ be two groups, and consider the constant prestacks $BG, BH$. Then a pair of morphisms $f_1, f_2 : BG \to BH$ is a pair of group homomorphisms $G \to H$, and (exercise) a $2$-morphism between them is a choice of an element $h \in H$ such that $f_1 = h f_2 h^{-1}$.
In particular, let $G = H$ and let $f_1 = f_2 = \text{id}_G$. Then a $2$-morphism $\text{id}_G \to \text{id}_G$ is a central element of $G$. Hence $\text{Aut}(\text{id}_G) \cong Z(G)$. The corresponding topological fact is that the topological monoid of homotopy equivalences $BG \to BG$ has $\pi_1$ naturally isomorphic to $Z(G)$.
Example. Consider the stack $\text{Pic} : \text{CRing} \to \text{Gpd}$ which assigns to a commutative ring $R$ the groupoid whose objects are invertible $R$-modules and whose morphisms are morphisms of $R$-modules, and let $f = g = \text{id}_{\text{Pic}}$. Thinking of $\text{Pic}$ as being represented by $B \mathbb{G}_m$ and keeping the above example in mind, I'm led to suspect that $\text{Aut}(\text{id}_{\text{Pic}})$ can be identified with $\mathbb{G}_m$ itself (and in particular that it makes sense as a group scheme and not just as a scheme, once this is suitably defined).