Sharapova saved four match points in a wild, 14-point final game. But on the fifth she pushed an easy forehand long, and she was out of the tournament after two rounds for the second year in a row.
The 2004 champion was playing in her fourth event since rejoining the tour last month following shoulder surgery in October. She's ranked 60th but was seeded 24th because of past success at the All England Club.
"This is not an overnight process," Sharapova said. "It's going to take time, as much time as I need on the court, to get everything together. ... Just being here is a wonderful accomplishment."
Dulko, ranked 45th, matched her best showing at Wimbledon by reaching the third round. She had won a total of only three games in two previous matches against Sharapova, but the Argentine repeatedly won points by hitting drop shots, while Sharapova struggled with her serve and forehand.
"I had so many easy balls, and I just made unforced errors from those," Sharapova said. "When I've had those situations before, those balls would be pieces of cake, and today they weren't."
Roger Federer and Serena Williams advanced with little trouble. Federer, bidding for his sixth Wimbledon championship and a record 15th major title overall, lost only three points on his first serve and defeated Guillermo Garcia-Lopez 6-2, 6-2, 6-4.
"The opponents are only going to get tougher," Federer said. "I'm playing great at the moment, and I hope it's going to last."
Williams, a two-time champion seeded second, committed only six unforced errors and defeated Jarmila Groth 6-2, 6-1. Then she learned that Sharapova had been beaten, easing Williams' path to the semifinals.
"I'm not that player that wishes someone else loses," Williams said. "I feel for her being injured. I know how hard it is to come back. She's playing really well. I think she'll be fine."
Earlier on Court 1, Novak Djokovic eased past Simon Greul of Germany. The fourth-seeded Djokovic won eight straight games after going down 1-0 in the second set to secure a 7-5, 6-1, 6-4 victory.
Djokovic will next play No. 28-seeded Mardy Fish of the United States, who matched his best showing at Wimbledon by reaching the third round when he beat Janko Tipsarevic 6-4, 3-6, 6-1, 6-4.
American Taylor Dent double-faulted 21 times and lost to Daniel Gimeno-Traver in the completion of a first-round match suspended because of darkness, 7-5, 7-6 (6), 4-6, 6-7 (3), 6-4.
"My bad days are pretty skanky," Dent said.
Michael Llodra retired with an abdominal injury following a collision that involved the chair-umpire stand, a ball girl and a trash bin. At 3-all in the first set against Tommy Haas, Llodra's pursuit of a shot sent him off the court. He bounced off the stand and into the girl, and they tumbled into the trash can.
Llodra rose, helped the girl up and hugged her. He received treatment from a trainer and finished the game, but then called it quits.
On the women's side, No. 16 Zheng Jie, a semifinalist as a wild card last year, lost to Daniela Hantuchova 6-3, 7-5. No. 8 Victoria Azarenka lost only six points in her six service games and shut out Ioana Raluca Olaru 6-0, 6-0.
No. 10 Nadia Petrova, No. 14 Dominika Cibulkova and No. 26 Virginie Razzano won.
Sharapova and Dulko played the day's first match on Centre Court in warm sunshine, and the new roof remained open for a third consecutive day. Dulko played almost flawless tennis at the start, committing only four unforced errors in the first 11 games.
But leading 3-love in the second set, she began spraying her shots, and Sharapova took advantage to win seven consecutive games.
"It took me a while to get going," Sharapova said. "It's a little too late to start picking yourself up when you're down a set and 3-love."
Sharapova wobbled again in the third set, double-faulting to lose serve and fall behind 2-1 in the final set. She double-faulted twice in a row and lost serve at love to fall behind to stay, 4-3.
With Dulko serving in the final game, Sharapova lost two challenges as she fell behind 40-15. Always at her best under pressure, Sharapova hit a booming return and a feathery drop shot to overcome the first two match points, and her return winner erased another.
But with a point for 5-all, Sharapova pushed a backhand into the net, and she made errors on the final two points as well. Dulko, playing on Centre Court for the first time, ranked the win as the biggest of her career.
"I was very nervous in the end," Dulko said. "The last game was forever for me."
Sharapova fell to 6-1 this year in three-set matches. She finished with nine double-faults and had at least one in every service game in the final set.
"Losses are tough, more here than at any other tournament," the three-time Grand Slam champion said. "But, you know, it puts some perspective into your life. It's all right. I have many more years ahead of me."