The first officially recognised Test match commenced on March 15, 1877 between England and Australia at the Melbourne Cricket Ground.
Gayle smashed debutant Sohag Gazi over long-on, taking 18 from the first over but the 21-year-old off-spinner took revenge by having the opener caught for 24.
Kieran Powell and Shivnarine Chanderpaul struck centuries to push West Indies towards a big total in the first innings of the first Test.
The tourists reached 361-4 at the close on the opening day with Chanderpaul unbeaten on 123 alongside Denesh Ramdin (52 not out), having completed his 26th Test century.
Powell was earlier out for 117 after Bangladesh had put West Indies in a spot of trouble with three wickets in the morning session.
The left-hander, making his second century, added 125 runs with Chanderpaul for the fourth wicket as the duo batted out the second session to restore order for West Indies, who won the toss and elected to bat.
"I think we definitely won this day," Powell said.
"Two guys getting centuries, 350 on the board and only four wickets down, it is a commanding position to press on for a good total.
"Generally we look at 400 in the first innings, but from this position, 500-plus should be a good total."
The home side opened the bowling with debutant Sohag Gazi, who was greeted by Gayle's six.
Gayle hit him for another six on the fourth ball but Gazi had the last laugh in the fifth over.
Mahmudullah took the catch at long-off as left-hander Gayle mistimed off a flighted delivery to depart for 24.
Gazi thought he had other opener Powell for seven but the left-hander was given a reprieve after the ball hit the helmet of the silly point fielder before heading towards Rubel Hossain, who dived to his left for a sharp catch.
Darren Bravo, however, had no such luck as the same fielder took the catch off Gazi to dismiss him on 14.
Bangladesh took the honours in the opening session when Shahadat Hossain dismissed Marlon Samuels for 16 with Gazi this time showing his skill as a fielder by taking a diving catch in the deep.
The hosts' advantage slipped away though in the wicketless second session dominated by Powell and Chanderpaul.
Powell completed his century sweeping left-arm spinner Shakib Al Hasan to the fine-leg boundary to go to the break on 115 not out.
The 22-year old, however, could add only two runs to his score on the resumption after tea before he missed the line of a Gazi delivery and was clean bowled.
His 178-ball innings contained 18 fours and a six off Gazi over mid-off.