Baumgartner scored the decisive goal in Austria's 3-1 win over Poland on Friday, unleashing a beautifully struck 66th-minute shot from the edge of the area to put his side back ahead at 2-1.
On the bus journey to the match, Rangnick sent a picture to Baumgartner of the player celebrating a goal for his club Leipzig to try to fire him up.
He had wondered initially, however, if his text had jinxed Baumgartner, who had struggled in the first half and needed a halftime pep-talk.
"I do that to one or two other players from time to time," Rangnick said of sending texts. "I don't know if that was such a good idea when I look at the first half from him," he joked.
Baumgartner had scored in four successive Austria matches coming into the Euros but drew a blank in their opening Group D defeat by France.
After finding the net against Poland, Baumgartner pointed at Rangnick and ran straight to him before celebrating with an ecstatic embrace.
"I wanted to give him something back and show him that I am extremely grateful," Baumgartner said.
The defeat eliminated Poland from Group D after France and Netherlands drew 0-0. Austria face the Dutch on Tuesday in Berlin.