The Northern Ireland youth international, who has spent the last two campaigns with Rovers, has established himself as the Pirates' first choice right-back under manager John Ward and has been one of their star performers this season.
"I've been really pleased with Michael's attitude and approach to the game since I've worked with him," Ward told the club's official website.
"He wants to try to improve as a player with Bristol Rovers, which is good news for everyone.
"He has been an absolute diamond in terms of our back five and has played a very big part in us getting ourselves into a safe position."
Smith said: "It's a relief to get a new contract signed with two games of this season still to go.
"I've enjoyed two years here already and I'm really enjoying my football at the moment and I hope that, as a team, we can continue the progress we have made this season."
- Sports & Recreation
- Bristol Rovers