how to inject dependencies into an access controller?
This can be done using services. Here's an example which injects the entity type manager interface.

eclone_extras.services.yml:

services:
  eclone_extras.access:
    class: Drupal\eclone_extras\Access\EcloneExtrasAccess
    arguments: ['@entity_type.manager']


Route subscriber:

 /**
   * Alters existing routes.
   */
  public function alterRoutes(RouteBuildEvent $event) {
    $collection = $event-&gt;getRouteCollection();

    if ($route = $collection-&gt;get('entity.node.clone_form')) {
      // Add custom access
      $route-&gt;setRequirement('_custom_access', 'eclone_extras.access::access');
    }
  }


Access class:

namespace Drupal\eclone_extras\Access;

use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;

class EcloneExtrasAccess {

  /**
   * The entity type manager.
   *
   * @var \Drupal\Core\Entity\EntityTypeManagerInterface
   */
  protected $entityTypeManager;

  /**
   * Constructs a new ContentEntityCloneBase.
   *
   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
   *   The entity type manager.
   * @param string $entity_type_id
   *   The entity type ID.
   */
  public function __construct(EntityTypeManagerInterface $entity_type_manager) {
    $this-&gt;entityTypeManager = $entity_type_manager;
  }

  /**
   * Custom access checker for the create lock requirements route.
   *
   * @see \Drupal\content_lock\Routing\ContentLockRoutes::routes()
   */
  public function access() {
    // do access stuff
    return AccessResult::allowed();
  }

}


The access callback gets some parameters as well, such as Account and possibly request.

Refs:  


https://www.drupal.org/docs/8/api/routing-system/access-checking-on-routes