The summer recruit, making his competitive debut, found the net from 12 yards after John Sutton tangled with Tibor Heffler in the box.
Istvan Sipeki gave the home side a 32nd-minute lead against the run of play when he lobbed Marian Kello from outside the box.
With an away goal, Hearts will be confident of finishing this third qualifying round contest off by winning the second leg next Thursday.
Hearts manager Jim Jefferies decided to start with David Obua even though the Ugandan had a stressful trip to Hungary after making a late dash to London to renew his passport before then encountering visa complications at immigration in Budapest Airport.
Jefferies made two changes from the team that drew 1-1 in Saturday's opening Clydesdale Bank Premier League game at Rangers.
Hamill, suspended for the SPL opener, came in for the injured Mehdi Taouil while Adrian Mrowiec also started with Andy Webster sidelined.
Hearts were quick out of the traps with Danny Grainger crossing for Sutton but the former Motherwell marksman nodded a header well wide of target from 12 yards in the fourth minute.
The hosts threatened for the first time after eight minutes when Laszlo Bartha turned away from Ian Black but dragged his low right-footed effort well wide from distance.
Obua then hit a looping shot over the bar in the 12th minute after Marian Kello's long kick-out was allowed to bounce deep in the home half.
However, after a solid start by Hearts, the hosts took the lead.
Jefferies' team were down to 10 men at the time with Ian Black off the pitch receiving treatment for a knock when Istvan Sipeki lobbed Kello.
Bartha's initial effort from outside the box was blocked by Eggert Jonsson and Sipeki struck the bouncing ball over the stranded goalkeeper.
However, Hearts were level on the stroke of half-time through a penalty from Hamill.
Sutton appeared to be hauled to the ground by Tibor Heffler as he tried to reach Grainger's free-kick.
Heffler was booked and Hamill coolly lifted his spot-kick high into the net.
The Hungarian side recovered from their disappointment of losing that goal as they made a bright start at the start of the second period.
A neat move that culminated in Heffler being set free in the box spurred Zaliukas into action with the Hearts captain making a last minute block.
Both sides seemed more edgy after the break but Ryan McGowan broke from full-back with a run that took him into the home box. The Australian tried to find Sutton but his low pass was cut out by the goalkeeper.
Hearts created an opening in the 68th minute but were left frustrated in front of goal. Hamill's close range left-footed volley was saved by the goalkeeper and Sutton header the rebound wide from an awkward position.
However, the hosts were not finished either and Tamas Kiss curled a 25-yard free-kick just past Kello's far post.
Both teams rang the changes in the dying minutes but were unable to influence proceedings as the game finished in a draw.