After blowing a three-run lead, the Orioles went back on top in the eighth. Adam Jones drew a leadoff walk from Tim Collins (1-1) and advanced when Luke Hochevar threw wildly to first base on a pickoff attempt. Wieters then lofted an opposite-field fly to left that landed just inside the foul line for a double.
Tommy Hunter (2-1) worked 1 1-3 innings of relief and Jim Johnson got three straight outs for his 12th save.
It was the fourth win in five games for the Orioles, who moved within a game of first-place Boston in the AL East.
Baltimore starter Wei-Yin Chen had a 3-1 lead in the seventh inning when rain forced a 48-minute delay. After play resumed, Brian Matusz got an out before yielding a two-run homer to Alex Gordon.
Chen allowed two runs and nine hits in 6 1-3 innings. He was backed by three double plays.
Ervin Santana gave up three runs and seven hits in six innings for Kansas City. The right-hander walked one and struck out four.
Baltimore went up 3-0 in the first. Singles by Manny Machado, Nick Markakis and Adam Jones produced a run before Wieters hit a two-out, two-run double.
In the third, former Oriole Miguel Tejada hit a one-out single and scored on a single by Alcides Escobar. In the bottom half, Tejada made a diving stop of Jones' grounder to third and made a successful throw to first while in a sitting position.
Baltimore shortstop J.J. Hardy saved a run with a sparkling dive-and-throw play in the fourth. With two outs and a runner on second, Hardy went to the edge of the outfield grass to snare a grounder by Salvador Perez before throwing to first while on his knees.
Santana regrouped from his shaky start to retire 12 straight batters until Nate McLouth singled with two outs in the fifth. Machado followed with a single before Markakis hit a fly to left.