Substitute Quincy Owusu-Abeyie scored the only goal two minutes from full time to help Ghana claim victory over Latvia in their final warm-up match ahead of the World Cup.
The Black Stars, who were thumped 4-1 by Holland in their only other pre-finals friendly, dominated for large parts of the game, which was being played at the Stadium MK in Milton Keynes.
Coach Milovan Rajevac made eight changes to the team that lost to the Dutch, including handing a full debut to Portsmouth midfielder Kevin-Prince Boateng.
Striker Asamoah Gyan hit the underside of the bar in the first half, while the impressive Kwadwo Asamoah wastefully blasted over after beating two defenders and with goalkeeper Latvia Andris Vanins wrong-footed.
In the second period, Rajevac made five changes, including the introduction of Owusu-Abeyie on the hour mark.
The Al-Sadd forward had two chances - the first one blasted into the crowd - but in the 88th minute, he picked up the ball on the edge of the box and fired in a powerful shot beyond Vanins to snatch the win.
The west Africans, who are making a second appearance at the World Cup following their debut four years ago, are in Group D for the finals, alongside Germany, Serbia and Australia.