Substitute Michal Pospisil gave Hearts a crucial three points in the quest for a UEFA Cup place with a late strike.
Pospisil headed in a free-kick from Laryea Kingston with just 12 minutes left to settle the issue.
But the game ended in fury as Hearts players reacted angrily to a challenge by Gary Wales on Kingston.
Wales was booked but Goncalves was red card for his part in the fray that followed in front of the Hearts dugout.
There was little to choose between the teams and it was obvious one goal would settle it.
Killie were on the rack in the first half as Hearts forced a series of corners.
Jamie Hamill did some great mopping up work to prevent Bruno Aguiar's low cross from inflicting serious damage and another tempting Aguiar ball moments later found no takers in front of goal.
Hristos Karipidis tried his luck from distance but it was a woeful effort and it failed to trouble Graeme Smith.
Andrius Velicka had a better chance after Killie made a hash of clearing their lines, but the hounding of Gordon Greer ensured he thumped his shot well wide.
Momo Sylla got his head to a Peter Leven free-kick at the other end but sent it across the face of the goal and there was no team-mate there to take advantage.
Both teams were struggling to create anything worthwhile but Simon Ford had a decent effort when he stretched to get a head to Leven's corner but his effort was just too high.
Kingston came closest in the first half with a 20-yard shot just before the interval which dipped just wide.
The Ghana international made a superb goalmouth clearance from Ryan O'Leary late on.
Then, with only 12 minutes remaining, super-sub Michal Pospisil was left unmarked in the box to nod home Kingston's free kick, placing his header down and out of the reach of the keeper from 12 yards.
There was still time however for Jose Goncalves to get himself sent off, the Portuguese U-21 international recieving a straight red in the dying seconds for an apparant barge on Gary Wales.