Sharks lock Grobler powered his way over from short distance before the break and accuracy from the kicking tee from Jordan Hendrikse and Siya Masuku helped their side to a commanding first-half advantage.
The Irish side rallied in the second half, with Forde chipping over the Sharks defence before getting on the end of a Mack Hansen assist to run in for the try.
The comeback continued with a quickfire double – Heffernan once again burrowing over from the back of a maul before Jennings sprinted in from a long distance breakaway to secure the bonus point and bring the deficit to within one point.
With the game in the balance, the hosts were rewarded after a sustained period of pressure on the Sharks line with replacement Dowling eventually stretching over to give his side the lead with 10 minutes remaining.
Connacht held on to their lead in the final stages and Forde added a penalty to cap a remarkable victory.
Connacht: Santiago Cordero; Mack Hansen, Piers O’Conor, Cathal Forde, Shane Jennings; Josh Ioane, Ben Murphy; Denis Buckley, Dave Heffernan, Finlay Bealham; Niall Murray, David O’Connor; Josh Murphy, Conor Oliver, Cian Prendergast (capt).
Replacements: Dylan Tierney-Martin, Peter Dooley, Sam Illo, Oisín Dowling, Shamus Hurley-Langton, Caolin Blade, David Hawkshaw, Paul Boyle.
Sharks: Jordan Hendrikse; Eduan Keyter, Jurenzo Julius, Andre Esterhuizen, Ethan Hooker; Siya Masuku; Bradley Davids; Ntuthuko Mchunu; Dylan Richardson, Ruan Dreyer; Jason Jenkins, Gerbrandt Grobler; James Venter, Vincent Tshituka (capt), Emmanuel Tshituka.
Replacements: Fez Mbatha, Trevor Nyakane, Hanro Jacobs, Corne Rahl, Reniel Hugo, Tinotenda Mavesere, Tian Meyer, Gurswin Wehr / Lionel Cronje.