The 35-year-old former Chelsea and AC Milan striker hit the mark with two headers in the second half, cancelling out Zlatan Ibrahimovic's short-range opener for Sweden.
Sweden missed two golden chances to level the score through substitute Christian Wilhelmsson and defender Olof Mellberg.
Ukraine go top in Group D after England and France played out a 1-1 draw in Donetsk.
The Ukrainians face an even tougher test in the shape of France Friday, when Sweden and England clash in Kiev.
Photos: Tamannaah Bhatia sizzles in metallic gown
Photos: Arjun Kapoor and Raj Thackeray at event in Mumbai
In pictures: Here are the fastest ODI centuries in cricket history
'Shaadi No. 1': 10 famous Bollywood weddings in pictures
Photos: Shah Rukh Khan, Shweta Bachchan at Karan Johar's book launch