That seems to be true.
At the time and at that place, not all, and not necessarily the majority, but surely many did believe that. As well as before the quake event and afterwards, in Massachusetts and elsewhere. Since this was merely one notion of the – scientific – debate about the natural characteristics of both phenomena.
This does not say that this belief held on for very long, as we see that lightning rods continued to be installed.
We clearly see that a connection between rods and quakes was made earlier and then continued to be made for some time after 1755. "Theology" or "church" vs "science" mischaracterises almost everything about this controversy. Apparently fully on purpose.
The claim as asked in the title of this question and the details from the quote are accurate. How this is embedded in the almost teleological progressivist narrative of the claim's source book is highly misleading.
The often copypasted snippet-quote is inaccurate in how it artificially dichotomises this debate, as the division between 'science and religion', or for example Winthrop and Prince, since it was not as diametrical or fundamental in its nature. And not that quickly decided either. Both argued that ultimately all was 'God's will', or that 'his' anger was responsible for fate and thus also earthquakes, and both added more naturalistic nuances to their explanations.
As the majority of 'interpreters of the event' at the time did argue for 'no time to analyze, but urgent need to repent': Prince added to his spiritual interpretation the 'scientific' extra-notion that perhaps electricity channeled by iron points facilitates quakes.
Whereas Winthrop argued that God's anger still manifests itself in miasmatic like disturbances of fluids and vapours below ground, but could neither be swayed nor would it be possible to influenc it by metal rods. Arguably the latter is 'closer' in its explanatory value to the modern understanding, but both are inexact, and both involve religious overtones for 'the deeper reason'. With Prince's argument holding sway for quite a while.
A summary with quite some starting points to read further references on this:
Historians have by and large concluded that Winthrop bested Prince, but the pastor successfully convinced at least some contemporaries that lightning rods were, in John Adams’s words, an “attempt to robb the almighty of his Thunder, to wrest the Bolt of Vengeance out of his Hand.”
Discussion of the Cape Ann earthquake, including the debate over “iron points,” makes clear that causation of phenomena from lethal epidemics to alarming earthquakes remained an active area of dispute in the 18th century. Such debates intensified with news of the far more devastating earthquake and tsunami which struck off the coast of Lisbon, Portugal, on All Saints Day, November 1, 1755. The awesome power and fearsome destructiveness of the great Lisbon earthquake shaped scientific understanding and philosophical understanding of earthquakes toward modern seismology. But in the more parochial discussion of a far gentler, if still frightening, New England tremor, emerge important ideas of how human beings related to the earth around them and understood the diseases from which they suffered.
Footnote 29 reads, with altered formatting to emphasise the second paragraph, and links to the papers mentioned for convenience:
 Adams quoted in Robles, “Atlantic Disaster,” 24.
Robles argues that most historians have misrepresented this dispute and that at the time many people regarded Prince as having triumphed over Winthrop.
On the “iron points” debate, see Clark, “Science, Reason, and an Angry God”; Eleanor M. Tilton, “Lightning-Rods and The Quaking Body: Sensation, Electricity, and Religious the Earthquake of 1755,” New England Quarterly 13, no. 1 (March 1940): 85–97; Valencius, Lost History, 211.
— Conevery Bolton Valencius: "John Winthrop’s Lecture on Earthquakes (1755) and “Pestilential Distempers” Caused by Environmental Disruption." Harvard Library Bulletin No Volume.
The words Adams wrote down in 1758 were:
“O! there is no getting out of the mighty hand of GOD!”
This Exclamation was very popular, for the Audience in general like the rest of the Province, consider Thunder, and Lightning as well as Earthquakes, only as Judgments, Punishments, Warnings &c. and have no Conception of any Uses they can serve in Nature.
I have heard some Persons of the highest Rank among us, say, that they really thought the Erection of Iron Points, was an impious attempt to robb the almighty of his Thunder, to wrest the Bolt of Vengeance out of his Hand. And others, that Thunder was designed, as an Execution upon Criminals, that no Mortal can stay. That the attempt was foolish as well as impious. And no Instances, even those of Steeples struck, where Iron Bars have by Accident conveyed the Electricity as far as they reached without damage, which one would think would force Conviction, have no weight at all.
— from the Diary of John Adams: [Marginalia in Winthrop’s Lecture on Earthquakes, December 1758?], Founders Online.
To further dispel the implied notion that by 1755 this falsely read as polarised, supposedly 'debate between science & religion' would then have been settled very quickly and decisively in favour of the then still quite shaky science:
Connections with earthquakes and preceding rain were widespread, but there were also "electrical" explanations put forward, most notably by the French natural philosopher Pierre Bertholon. He saw a clear connection between the dry fog and the high frequency of thunderstorms. Bertholon held a disturbance of the "electrical equilibrium" responsible and thereby offered a kind of holistic explanation for the whole set of strange phenomena of the summer of 1783, including the appearance of a new island off the Icelandic coast.
There is one more "electrical" explanation of the dry fog that held the lightning rods responsible. An anonymous author wrote:
"If one considers, how much the use of lightning rods in England and the Netherlands has gotten out of hand in the past couple of years, and how much it has nearly turned into abuse, then naturally one has to come up with the idea that this invention may have contributed a lot to the present vaporization of the fog. One tries to protect the houses from lightning, but in general the damage caused thereby is disproportionately greater."
The skeptic argued that the lightning rods drew the electricity from the air into the ground. Consequently, the sulfurous vaporization in the air was no longer bound, so it caused the dry fog.
The skeptic elicited several replies, refuting the argument quickly and even ridiculing it. Writers who opposed the introduction of the lightning rod or questioned its use had a hard time in the public arena of the day. In the newspapers and journals, virtually all of the authors were very much in favor of the lightning rod.
— Oliver Hochadel: "'In nebula nebulorum': The Dry Fog of the Summer of 1783 and the Introduction of Lightning Rods in the German Empire", Transactions of the American Philosophical Society , 2009, New Series, Vol. 99, No. 5, Playing with Fire: Histories of the Lightning Rod (2009), pp. 45–70. jstor
In case the (also) theological orientation of the supposedly 'purely' 'rational', 'naturalistic', 'scientific' side of the argument back then from the beginning of this post should be doubted so much as to possibly elicit screams for 'references for that claim, please':
The debate between Winthrop and Prince continued for months in the press. Other scholars have discussed the controversy in depth, and it tends to dominate the existing literature on the Cape Ann earthquake to the point of giving the impression that science and religion were more opposed than they truly were.
While historians often note that Winthrop “won” the debate, John Adams suggested that many Bostonians bought Prince’s argument, at least for a time, as they believed that the iron rods “attempt to robb the almighty of his Thunder, to wrest the Bolt of Vengeance out of his Hand.” Both Winthrop’s and Prince’s documents reveal the various voices that emerged after the event and the unsettled authority of science or religion; the two domains, rather than existing in continuous contention, often bled together, with ministers studying natural phenomena and philosophers offering moral explanations.
Both documents also suggest each author’s impulse to offer immediate commentary on the event—rushed reflection that always begged for supplementation later as new facts emerged or new fictions required silencing. In January of 1756, Winthrop would submit a version of the observations in his lecture to London’s Royal Society in a letter later published in its Philosophical Transactions.
The introduction recognized just this issue of the time needed to obtain a full account of the physical event, as he wrote: “I deferred writing till this time, in order to obtain the most distinct information of the several particulars relating to it, both here and in the other places where it was felt, and especially the extent of it.”
Thus, the social expectation for ministers and scientists to immediately and publicly interpret the earthquake remained at odds with an accurate, holistic account of this disaster, creating a public picture of the earthquake as an event under constant revision.
— Whitney Barlow Robles: "Atlantic Disaster", The New England Quarterly , March 2017, Vol. 90, No. 1 (March 2017), pp. 7–35. jstor
We therefore see a cleric attempting to use natural aspects to make his argument, while a scientist uses moral and theological arguments to underpin his now seemingly more natural explanation.
That the now seen as more theological side of the debate was relatively widespread is also logically self-evident, immanent from its supposed dismissal, as we also read elsewhere on this page:
“Since the earthquake,” claimed Winthrop, “our pulpits have generally rung with terror.” He accused the clergy of exploiting earthquakes, comets, and “other terrifying phenomena... to keep up in mankind a reverent sense of the deity.” Winthrop let his passion for rational science get the better of him, but there was no denying his data, and Prince publicly conceded Winthrop’s points, with somewhat more grace than the younger man had shown in his attacks.
— "The Earthquake Of 1755: Science V. Religion", Cengage, Encyclopedia.com.
We see an argument formulated in strong words, against many opponents, and perhaps in dire 'need of reprimand'. But "our pulpits"/"the clergy", is neither numerically such a small number of opponents, nor was the named opposition without influence/followers, nor was the general populace at the time overly prone to just ignore what the clergy had to say.
To top that all off, in a way it was the 'iron point' proponent Franklin himself who made earlier scientific and theoretical connections between electricity and earthquakes and thus paving the way for what many now simply dismiss as ridiculous:
Strange as it may seem to the modern reader, in the 18th century the theory that lightning might be related to earthquakes was scientifically acceptable. For example, in The Pennsylvania Gazette for 15 December 1737, Franklin printed an article about earthquakes in which the opinion was endorsed
"that the material cause of thunder, lightning, and earthquakes, is one and the same, v/z. the inflammable breath of the Pyrites which is a substantial sulphur(and takes fire of itself."
Adherents to this theory later proved to be among the first to applaud Franklin's notions on the electrical nature of the lightning discharge. […]
During 1750 and 1751 the London magazines devoted much space to letters on the cause of earthquakes. Some writers, agreeing with Stukeley's position, approved the hypothesis that lightning may cause earthquakes, […]
— I. Bernard Cohen: "Prejudices against the introduction of Lightning Rods", Journal of the Franklin Institute, Volume 253, Issue 5, May 1952, pp393–440.
To again emphasise the nuance of differing in scientific details but both sides still being on the very same side of the religious/theological part of the debate:
Thomas Prince appended to the Fowles' 1755 edition of his Earthquakes the Works of God (as a part of the lightning rod debate) an acknowledgment of Franklin's work with lightning and electricity, and put forth the possibility that the "electrical substance" plays a parallel role in earthquakes. But whatever reference to "secondary causes" the minister made, it was always preliminary to an assertion that God alone is the first cause of earthquakes and of everything else nature.
As we have seen, Winthrop, the leading scientist of New England if not of the New World, readily assented to the same proposition and felt it part of his duty as a "natural philosopher" to expound upon it at some length.
— Charles Edwin Clark: "Science, Reason, and an Angry God: The Literature of an Earthquake", The New England Quarterly, Vol. 38, No. 3, 1965, pp.340–362. jstor