“A sort of Hercules in strength” is easy. The mythical Hercules was renowned for his strength, for example in the eleventh labour where (in one version) he holds up the sky, in place of Atlas, while the latter fetches the golden apples of the Hesperides. Joe Gargery is a blacksmith, a profession requiring strength for the forging of metal objects. Pip says that Joe is
like the steam-hammer that can crush a man or pat an egg-shell, in his combination of strength with gentleness.
Charles Dickens (1867). Great Expectations, chapter XVIII. Project Gutenberg.
As for “and also in weakness”, I think the allusion is to the story of Hercules being sold as a slave to Omphale, queen of Lydia:
Because of his murder of Iphitus Heracles was attacked by a disease, and […] he inquired of Apollo how to heal it. Apollo gave him the answer that he would easily rid himself of the disease if he should be sold as a slave and honourably pay over the purchase price of himself to the sons of Iphitus, and so, being now under constraint to obey the oracle, he sailed over to Asia in company with some of his friends. There he willingly submitted to be sold by one of his friends and became the slave of Omphalê, the daughter of Iardanus, who was still unmarried and was queen of the people who were called at that time Maeonians, but now Lydians. The man who had sold Heracles paid over the purchase price to the sons of Iphitus, as the oracle had commanded, and Heracles, healed now of the disease and serving Omphalê as her slave, began to mete out punishment upon the robbers who infested the land. […] Omphalê was pleased with the courage Heracles displayed, and on learning who he was and who had been his parents she marvelled at his valour, set him free, and marrying him bore him Lamus. Already before this, while he was yet a slave, there had been born to Heracles by a slave a son Cleodaeus.
Diodorus of Sicily (1st century BCE). Bibliotheca historica IV.31. Translated by C. H. Oldfather (1953). London: William Heinemann.
The implication is that Joe Gargery is as much dominated by his wife as Hercules was by Omphale. Pip says that Mrs. Joe was in the habit of beating her husband:
knowing her to have a hard and heavy hand, and to be much in the habit of laying it upon her husband […]
By this time, my sister was quite desperate, so she pounced on Joe, and, taking him by the two whiskers, knocked his head for a little while against the wall behind him, while I sat in the corner, looking guiltily on.
Dickens, chapter 2.