How can I best seal this gutter to the flat rubber roof of my garage?
You can seal that gap quite effectively with a product called Eternabond - it's very popular in the RV world to seal roof seams, vents, windows, etc.  Simple to work with (it's basically like a roll of tape), waterproof and very durable.  

Eternabond Website

Good source for Eternabond