The sides could not be separated in an action-packed 90 minutes and Nicky Clark's missed spot-kick proved decisive for Ladbrokes Championship club United.
Irving was later sent off, with just six minutes remaining, after appearing to handle on the edge of his own box as he prevented Clark from driving through on goal on the break.
And, with open play failing to find a winner, Hearts' 100 per cent success rate from the spot earned them an extra point.
At a rain-lashed Tynecastle it did not take long for the teams to zip into action.
Hearts had wasted an early free-kick opportunity before United broke the deadlock in only the ninth minute.
The visitors attacked quickly after another home attack faltered and Adrian Sporle's cross broke kindly to Sam Stanton and he drove his way into the heart of the home box.
When he chipped a superb cross back into the six-yard box, Shankland reacted first to nod in calmly.
The Tynecastle men had plenty of chances to draw level again but could not find the finishing touch needed.
New signing Conor Washington dragged one shot across goal and wide before Sean Clare was too straight with another.
Then, when Uche Ikpeazu's neat flick sent returning hero Jamie Walker through on goal, the winger blasted straight at United keeper Benjamin Siegrist.
With half an hour gone, Washington headed over a fantastic left-wing cross from Jake Mulraney as Hearts continued to dominate possession and chances without anything to show for it.
But just a minute from the break they finally found the net.
From a disputed free-kick on the right, the ball was cleared only as far as Irving and the midfielder drilled his left-footed volley low past Siegrist.
The second half could not maintain the same pace but Hearts dominated yet again without finding the second goal they craved.
Irving's red card added some intrigue to the final few minutes before the penalty shoot-out gave Hearts extra reason to cheer.