The pair were found guilty of misconduct at a Rugby Football League hearing in Leeds after admitting gambling ?1,000 on an under-strength Saints to lose by more than eight points to the champions on Easter Monday.
Both players collected around ?900 after Bradford won 54-8 against a St Helens side lacking 11 regulars.
Gleeson, who played in the match and ironically scored the opening try, has been banned for four months and Long three months. Both were also fined ?7,500 and ordered to pay ?2,205 in costs.
The suspensions begin with immediate effect, ruling the players out of Friday's League match at Widnes, and are likely to have a major impact of St Helens' prospects of adding the Super League crown to last month's Challenge Cup triumph.
The players left without comment four hours after the hearing began and have 15 days in which to lodge an appeal.
Long, Super League's leading scorer in 2004 with 179 points from 16 League and Cup matches for his club, will be free to play again on September 17, just before the end of the regular season.
His suspension ends two days before St Helens' scheduled final League match, which coincidentally is against Bradford at Odsal.
It means Long will be able to take part in the Super League play-offs and for Great Britain in the end-of-season Tri-Nations Series against Australia and New Zealand but that prospect seemed a long way off tonight.
Sean Sexton, Long's legal representative, said: "In hindsight, Sean realises that he was daft to have a bet on the game but the tribunal accepted that he was not dishonest and he was not involved in any betting coup.
"Sean is disappointed that, given his exemplary disciplinary record, the ban he has been given, effectively finishes his season.
"We will seriously consider appealing the decision once we have been able to study the judgement."
Gleeson, who has been handed a greater punishment because he played in the match, is banned until October 17, the day after the Grand Final, and is effectively ruled out of the Tri-Nations Series.
On behalf of Gleeson, David Hanman said: "Martin is very upset. His season is at an end and he has gone home to be with his family to digest the decision."
The panel, headed by judge Peter Charlesworth and also comprising Deryck Fox and former Castleford chairman David Poulter, heard that the players admitted placing the bets but said they were unaware of the relevant bye-laws.
The bets were said to have been placed on the day before the match and the players are said to have expressed their shame and apologised for their actions.
Long initially told the Daily Mail that he had placed the bet for a friend but an investigation revealed that both players placed their winnings in their own bank accounts.
In a statement, the panel said: "The adverse publicity to the RFL and to sport generally when these bets were exposed has been immense.
"It brings into question the integrity of the game and the perception of the sport by the general public let alone by the supporters of a team who are entitled to expect their players to seek only the success of their side and not to obtain a personal profit by them losing.
"There must be a significant penalty in order to fulfil our duty to preserve the good name of rugby league. We are also conscious that we are setting a precedent."
RFL executive chairman Richard Lewis said just under 50 calls were received to the hotline set up in the wake of the revelations but the investigation showed there was no widespread betting coup or suggestions of match-fixing.
"The decision reinforces the rules of rugby league and the fact that betting of this nature will not be tolerated," said Lewis.
"We have no evidence that betting is a widespread problem. We will consider what lessons need to be learned but it is important to keep this isolated incident in context.
"It's a setback but I don't think it will be a setback in the long term."Like