After a goalless first period, Chris Coleman’s side twice hit the crossbar via David Vaughan and debutant Declan John.
The hosts got the breakthrough on 67 minutes when Craig Bellamy, playing his last home game for Wales, crossed for Church to slot home.
Aaron Ramsey was then fouled by Nikolce Noveski in the box but saw his subsequent penalty saved by Tome Pacovski as Wales held on to win and climb off the foot of the table and into fourth.
Injury-hit Wales, missing 11 players from Coleman’s initial squad selection, ground out a first win in five games.
The storm clouds have been gathering around Coleman following back-to-back defeats against the Macedonians and Serbia last month, and discussions over his two-year contract extension had stalled with Football Association of Wales chiefs wanting to wait for the Dragons to finish the campaign.
Coleman has appeared increasingly alienated from his employers, and he has called for them to give him their full backing while revealing they have asked him to make alterations to his backroom staff.
But his patchwork side produced a creditable performance, after a slow start, to alleviate some of the pressure on him.
Ramsey made their first meaningful surge as his cross evaded Church, while Mirko Ivanoski chipped over after a surging run from a rapid Macedonia counter.
Ramsey was always likely to be Wales’ key man, and he was central to all their best moments. Another lovely run and pass from the Arsenal man found Neil Taylor cutting in onto his left foot, but Pacovski held his shot.
Ramsey then teed up Andy King, who flicked an effort goalwards to be palmed away by Pacovski.
But Wales really should have been behind two minutes later when they failed to clear a Macedonia corner.
The hoist back into the box fell to Noveski, the defender rounded Wayne Hennessey, winning his first cap for almost two years, but could only scoop his strike well over the bar.
Wales responded with an excellent attack but Church could not get his header on target from John’s superb cross, and Hal Robson-Kanu had a strong penalty shout waved away after a clumsy tackle by Ezgjan Alioski.
Bellamy, who was having a quiet game, sprang to life with a rasping drive that Pacovski held at the second attempt, before a deflected Church shot landed on the roof of his net.
Vaughan and John struck the woodwork in quick succession at the start of the second half before Wales finally finished one of their chances in the 67th minute.
Ramsey’s perfect pass to Bellamy saw the Cardiff man tee up Church for an easy finish to make it 1-0.
Bellamy could have doubled the lead after more marvellous play by Ramsey, but did not have the legs to evade the covering defenders.
Macedonia had been on the back foot but they would have levelled in the 71st minute had it not been for a sharp Hennessey stop, after Goran Pandev had been given an age to turn and pick his spot.
Wales were guilty of trying to sit on their lead but succeeded only in inviting pressure, and Hennessey had to be alert again when Agim Ibraimi snuck in at the far post.
But the hosts should have doubled their lead when Ramsey was brought down in the box by Noveski.
The midfielder appeared to speak with the retiring Bellamy about who should take the spot-kick, but assumed the responsibility and saw his effort saved by Pacovski.