World number 173 Ward had looked likely to fall short after the Spaniard cruised through the opening set, but he got the crowd around court 14 on their feet by storming to level the match with a 21-minute 6-0 second set.
Andujar hit back to make it seem once again as if the match would go to form, but Davis Cup player Ward used his superior firepower on serve to come through the final two sets - though Andujar fought hard throughout and the deciding set took almost an hour.
Ward will play Mardy Fish of the US in the second round.
British women's number three Elena Baltacha also came through her opening match, coming from behind to beat Italy's Karin Knapp 4-6 6-4 6-0.
World number 101 Baltacha had been favourite to win a match against a player ranked 11 spots below her, but the Italian had the Ukraine-born former British number one on the ropes as she took the opening set.
Baltacha fought back hard, however, breaking her opponent's resistance in the second set and then benefiting from an unfortunate slip by Knapp which saw her unable to compete properly thereafter.
The British player ended up crushing her opponent in the third set to earn a second-round match against defending champion Petra Kvitova, and give her one of the best days of her tennis career after also being named on the Olympic team.
"I didn't particularly start well and she was a very tricky opponent. I managed to kind of get the second set done, and I felt like I played better, but I was struggling with the serve," said Baltacha.
"Then the third set started and I felt like I was kind of me, in a way. I played well and I fought, and I was very, very delighted to have won that and to come through that being a set down."
Baltacha added that she is expecting a tougher match in the next round against the defending champion.
"She's a very good player, very classy. She's got a fantastic game on the grass. Obviously if she plays at her best it's going to be very, very tough but you never know what can happen. If it's on Centre or No.1 Court, I'll love the opportunity to play in front of a big crowd."
British number one Andy Murray was a massive favourite to win his match against Nikolay Davydenko, but nonetheless impressed with some stunning tennis as he thrashed the Russian 6-1 6-1 6-4 on what was an excellent day for home-grown players.
And completing a superb day for British players was women's number one Anne Keothavong, who came through her match against Laura Pous-Tio 6-3 6-3.
Keothavong, ranked 77th in the world, was never threatened by an opponent ranked 25 places below her as she attacked the Spaniard's serve ruthlessly, earning 11 break opportunities of which she took six.
Pous-Tio also had her chances, earning eight break points thanks in large part to Keothavong getting fewer than half her first serves in, but Keothavong saved all but three of the eight break points she ceded.
Not all the British players made it, however, with Laura Robson going out at the first hurdle, beaten 2-6 6-4 6-4 by 24th seed Francesca Schiavone in their first-round match.
Robson began in impressive fashion, taking the game to the 32-year-old Italian - who was playing in her 11th Championships at the All England Club.
Schiavone struggled with a back injury in the opening set, and Robson lost just two games as she took it with some confident groundstrokes and a good rhythm on serve.
The 24th seed called for the trainer at the start of the second set, and looked set for an early exit. But Robson spurned three break points, and the Italian used her experience to take control. She broke midway through the set and was utterly relentless as she piled on the pressure.
Robson quickly lost her serve in the final set as Schiavone continued her resurgence, and she cut a despondent figure after being broken for a second time midway through the set.
The Brit recovered to an extent, reducing the deficit with a break back to the excitement of the home crowd, but she could not overhaul her dogged and determined opponent.
The Italian closed out the match on her fifth match point, while for Robson it was a frustrating end to an encounter which she dominated so impressively during the early stages.
Johanna Konta also failed in her bid to make it into the second round after losing an epic clash 6-7(4) 6-2 10-8 against USA's Christina McHale.
The match had been suspended for bad light on Monday evening with the players locked at one set apiece and seven games each in the decider.
But when play resumed on Tuesday the world number 212 Konta - who switched nationalities from Australian to British just last month - managed to hold out for just four more games against a player ranked 180 spots above her.
Jamie Baker, meanwhile, will have to return on day three as he trailed 7-6 4-2 to former finalist Andy Roddick when a rain shower intervened and ended the day's play.